Пример #1
0
 public override string ToString(CancellationToken token, bool canDecompile)
 {
     if (Resource is EmbeddedResource er)
     {
         return(ResourceUtilities.TryGetString(er.CreateReader().AsStream()));
     }
     return(null);
 }
Пример #2
0
 public override string ToString(CancellationToken token, bool canDecompile)
 {
     if (Resource is EmbeddedResource er)
     {
         return(ResourceUtilities.TryGetString(new MemoryStream(er.GetResourceData())));
     }
     return(null);
 }
Пример #3
0
 public override string ToString(CancellationToken token, bool canDecompile)
 {
     if (ResourceElement.ResourceData.Code == ResourceTypeCode.ByteArray || ResourceElement.ResourceData.Code == ResourceTypeCode.Stream)
     {
         var data = (byte[])((BuiltInResourceData)ResourceElement.ResourceData).Data;
         return(ResourceUtilities.TryGetString(new MemoryStream(data)));
     }
     return(null);
 }