/// <summary> /// Construct with an existing ObjectStream /// </summary> /// <param name="stream">the stream to read</param> /// <exception cref="ArgumentNullException">Thrown if the specified stream is null</exception> public PSDataCollectionReader(PSDataCollectionStream <DataStoreType> stream) : base(stream) { System.Management.Automation.Diagnostics.Assert(stream.ObjectStore != null, "Stream should have a valid data store"); _enumerator = (PSDataCollectionEnumerator <DataStoreType>)stream.ObjectStore.GetEnumerator(); }
/// <summary> /// Construct with an existing ObjectStream. /// </summary> /// <param name="stream">The stream to read.</param> /// <param name="computerName"></param> /// <param name="runspaceId"></param> internal PSDataCollectionPipelineReader(PSDataCollectionStream <DataStoreType> stream, string computerName, Guid runspaceId) : base(stream) { System.Management.Automation.Diagnostics.Assert(stream.ObjectStore != null, "Stream should have a valid data store"); _datastore = stream.ObjectStore; ComputerName = computerName; RunspaceId = runspaceId; }
internal PSDataCollectionPipelineReader( PSDataCollectionStream <DataStoreType> stream, string computerName, Guid runspaceId) : base((ObjectStreamBase)stream) { this.datastore = stream.ObjectStore; this.computerName = computerName; this.runspaceId = runspaceId; }
/// <summary> /// Construct with an existing PSDataCollectionStream. /// </summary> /// <param name="stream">The stream to write.</param> /// <exception cref="ArgumentNullException"> /// Thrown if the specified stream is null /// </exception> public PSDataCollectionWriter(PSDataCollectionStream <T> stream) : base(stream) { }
public PSDataCollectionReader(PSDataCollectionStream <DataStoreType> stream) : base((ObjectStreamBase)stream) => this.enumerator = (PSDataCollectionEnumerator <DataStoreType>)stream.ObjectStore.GetEnumerator();