PSDataCollection<T> Constructors

Definition

Overloads

PSDataCollection<T>()

Default Constructor.

PSDataCollection<T>(IEnumerable<T>)

Creates a PSDataCollection that includes all the items in the IEnumerable and invokes Complete().

PSDataCollection<T>(Int32)

Initializes a new instance with the specified capacity capacity

PSDataCollection<T>(SerializationInfo, StreamingContext)

Creates a PSDataCollection from an ISerializable context.

PSDataCollection<T>()

Default Constructor.

C++
public:
 PSDataCollection();

Applies to

PowerShell SDK 7.4.0 i druge verzije
Proizvod Verzije
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

PSDataCollection<T>(IEnumerable<T>)

Creates a PSDataCollection that includes all the items in the IEnumerable and invokes Complete().

C++
public:
 PSDataCollection(System::Collections::Generic::IEnumerable<T> ^ items);

Parameters

items
IEnumerable<T>

Items used to initialize the collection

Remarks

This constructor is useful when the user wants to use an IEnumerable as an input to one of the PowerShell.BeginInvoke overloads. The invocation doesn't complete until Complete() is called on the PSDataCollection; this constructor does the Complete() on behalf of the user.

Applies to

PowerShell SDK 7.4.0 i druge verzije
Proizvod Verzije
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

PSDataCollection<T>(Int32)

Initializes a new instance with the specified capacity capacity

C++
public:
 PSDataCollection(int capacity);

Parameters

capacity
Int32

The number of elements that the new buffer can initially store.

Remarks

Capacity is the number of elements that the PSDataCollection can store before resizing is required.

Applies to

PowerShell SDK 7.4.0 i druge verzije
Proizvod Verzije
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

PSDataCollection<T>(SerializationInfo, StreamingContext)

Creates a PSDataCollection from an ISerializable context.

C++
protected:
 PSDataCollection(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);

Parameters

info
SerializationInfo

Serialization information for this instance.

context
StreamingContext

The streaming context for this instance.

Applies to

PowerShell SDK 7.4.0 i druge verzije
Proizvod Verzije
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0