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