forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCimWriteResultObject.cs
More file actions
45 lines (40 loc) · 1.18 KB
/
Copy pathCimWriteResultObject.cs
File metadata and controls
45 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#region Using directives
#endregion
namespace Microsoft.Management.Infrastructure.CimCmdlets
{
/// <summary>
/// <para>
/// Write result object to ps pipeline
/// </para>
/// </summary>
internal sealed class CimWriteResultObject : CimBaseAction
{
/// <summary>
/// Initializes a new instance of the <see cref="CimWriteResultObject"/> class.
/// </summary>
public CimWriteResultObject(object result, XOperationContextBase theContext)
{
this.Result = result;
this.Context = theContext;
}
/// <summary>
/// <para>
/// Write result object to ps pipeline
/// </para>
/// </summary>
/// <param name="cmdlet"></param>
public override void Execute(CmdletOperationBase cmdlet)
{
ValidationHelper.ValidateNoNullArgument(cmdlet, "cmdlet");
cmdlet.WriteObject(Result, this.Context);
}
#region members
/// <summary>
/// Result object.
/// </summary>
internal object Result { get; }
#endregion
}
}