mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
This commit uses psl-monad branch source-depot 7209cb9 And corresponds to [SD:688741]
38 lines
1.5 KiB
C#
38 lines
1.5 KiB
C#
/*============================================================================
|
|
* Copyright (C) Microsoft Corporation, All rights reserved.
|
|
*============================================================================
|
|
*/
|
|
|
|
using System;
|
|
using Microsoft.Management.Infrastructure.Options;
|
|
using Microsoft.Management.Infrastructure.Options.Internal;
|
|
|
|
namespace Microsoft.Management.Infrastructure.Internal.Operations
|
|
{
|
|
internal class CimSyncInstanceEnumerable : CimSyncEnumerableBase<CimInstance, CimSyncInstanceEnumerator>
|
|
{
|
|
private readonly bool _shortenLifetimeOfResults;
|
|
private readonly Guid _CimSessionInstanceID;
|
|
private readonly string _CimSessionComputerName;
|
|
|
|
internal CimSyncInstanceEnumerable(
|
|
CimOperationOptions operationOptions,
|
|
Guid cimSessionInstanceID,
|
|
string cimSessionComputerName,
|
|
Func<CimAsyncCallbacksReceiverBase, Native.OperationHandle> operationStarter)
|
|
: base(operationOptions, operationStarter)
|
|
{
|
|
this._shortenLifetimeOfResults = operationOptions.GetShortenLifetimeOfResults();
|
|
this._CimSessionInstanceID = cimSessionInstanceID;
|
|
this._CimSessionComputerName = cimSessionComputerName;
|
|
}
|
|
|
|
internal override CimSyncInstanceEnumerator CreateEnumerator()
|
|
{
|
|
return new CimSyncInstanceEnumerator(
|
|
this._CimSessionInstanceID,
|
|
this._CimSessionComputerName,
|
|
this._shortenLifetimeOfResults);
|
|
}
|
|
}
|
|
} |