Mono.Cecil.EmbeddedResource.GetResourceData C# (CSharp) Method

GetResourceData() public method

public GetResourceData ( ) : byte[]
return byte[]
        public byte[] GetResourceData()
        {
            if (stream != null)
                return ReadStream (stream);

            if (data != null)
                return data;

            if (offset.HasValue)
                return reader.GetManagedResource (offset.Value);

            throw new InvalidOperationException ();
        }

Usage Example

Esempio n. 1
0
 public byte[] decrypt(EmbeddedResource resource)
 {
     if (!CanDecrypt)
         throw new ApplicationException("Can't decrypt resources");
     var encryptedData = resource.GetResourceData();
     return decrypt(encryptedData);
 }
All Usage Examples Of Mono.Cecil.EmbeddedResource::GetResourceData