ReadStream() static private method

static private ReadStream ( Stream stream ) : byte[]
stream Stream
return byte[]
Esempio n. 1
0
 public byte[] GetResourceData()
 {
     if (this.stream != null)
     {
         return(EmbeddedResource.ReadStream(this.stream));
     }
     if (this.data != null)
     {
         return(this.data);
     }
     if (!this.offset.HasValue)
     {
         throw new InvalidOperationException();
     }
     return(this.reader.GetManagedResourceStream(this.offset.Value).ToArray());
 }