示例#1
0
 /// <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();
 }
示例#2
0
 /// <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;
 }
示例#3
0
 internal PSDataCollectionPipelineReader(
     PSDataCollectionStream <DataStoreType> stream,
     string computerName,
     Guid runspaceId)
     : base((ObjectStreamBase)stream)
 {
     this.datastore    = stream.ObjectStore;
     this.computerName = computerName;
     this.runspaceId   = runspaceId;
 }
示例#4
0
 /// <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();