예제 #1
0
        public HttpContent GetInputContent()
        {
            var content = new StreamContent(UdmFactory <T> .Serialize(_udmData));

            content.Headers.ContentType = new MediaTypeHeaderValue("application/xml");
            return(content);
        }
예제 #2
0
        public T Deserialize(HttpContent content)
        {
            var readTask     = content.ReadAsStringAsync();
            var stringResult = readTask.Result;
            var result       = UdmFactory <T> .Deserialize(stringResult);

            return(result);
        }
예제 #3
0
 public static T Get <T>(this IRepositoryService service, string id) where T : UdmBase
 {
     return(UdmFactory <T> .Deserialize(service.Get(id)));
 }