示例#1
0
 private static void PrintInDebug(WebResult<byte[]> result)
 {
     if (Debugger.IsAttached && result.IsSuccess)
     {
         Debug.WriteLine(result.AsText().Result ?? string.Empty);
     }
 }
示例#2
0
 public static WebResult <T> AsXml <T>(this WebResult <byte[]> webResult)
 {
     return(webResult.Cast(XmlSerializerExtensions.XmlToObject <T>));
 }
示例#3
0
 public static WebResult <T> AsJson <T>(this WebResult <byte[]> webResult)
 {
     return(webResult.Cast(DataContractJsonSerializerExtensions.JsonToObject <T>));
 }
示例#4
0
 public static WebResult <string> AsText(this WebResult <byte[]> webResult)
 {
     return(webResult.Cast(ByteArrayExtensions.GetString));
 }