Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Management.Automation;
- using JetBrains.Annotations;
- using PSModule2;
- namespace TestModule
- {
- [Cmdlet("Test", "Hoge")]
- public class TestHogeCommand
- {
- [NotNull]
- private readonly Cmdlet _cmdlet;
- public TestHogeCommand(
- [NotNull] ICmdletAccessor cmdletAccessor)
- {
- if (cmdletAccessor == null)
- {
- throw new ArgumentNullException(nameof(cmdletAccessor));
- }
- this._cmdlet = cmdletAccessor.Cmdlet;
- }
- public void BeginProcessing()
- {
- }
- public void ProcessRecord()
- {
- this._cmdlet.WriteObject("ほげー");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement