ReadStream() static private method

static private ReadStream ( Stream stream ) : byte[]
stream Stream
return byte[]
Ejemplo 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());
 }