Partager via


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.

public:
 PSDataCollection();
public:
 PSDataCollection();
 PSDataCollection();
public PSDataCollection ();
Public Sub New ()

Applies to

PSDataCollection<T>(IEnumerable<T>)

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

public:
 PSDataCollection(System::Collections::Generic::IEnumerable<T> ^ items);
public PSDataCollection (System.Collections.Generic.IEnumerable<T> items);
new System.Management.Automation.PSDataCollection<'T> : seq<'T> -> System.Management.Automation.PSDataCollection<'T>
Public Sub New (items As IEnumerable(Of T))

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

PSDataCollection<T>(Int32)

Initializes a new instance with the specified capacity capacity

public:
 PSDataCollection(int capacity);
public:
 PSDataCollection(int capacity);
 PSDataCollection(int capacity);
public PSDataCollection (int capacity);
new System.Management.Automation.PSDataCollection<'T> : int -> System.Management.Automation.PSDataCollection<'T>
Public Sub New (capacity As Integer)

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

PSDataCollection<T>(SerializationInfo, StreamingContext)

Creates a PSDataCollection from an ISerializable context.

protected:
 PSDataCollection(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected PSDataCollection (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.PSDataCollection<'T> : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.PSDataCollection<'T>
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

Serialization information for this instance.

context
StreamingContext

The streaming context for this instance.

Applies to