Exemple #1
0
        public static Dto GetObject()
        {
            var dto = new Dto();

            dto.StringMember   = "String data";
            dto.IntMember      = 1133;
            dto.BoolMember     = true;
            dto.DateTimeMember = DateTime.Now;

            return(dto);
        }
Exemple #2
0
        private static void RestCall(Dto dto, string restUrl)
        {
            var json = SerializeDTO(dto);

            var request = WebRequest.Create(restUrl + "/Echo");

            request.Method        = "POST";
            request.ContentLength = json.Length;
            request.ContentType   = "application/json; charset=utf-8";

            using (var writer = new StreamWriter(request.GetRequestStream())) {
                writer.Write(json);
            }

            var responce = request.GetResponse();

            var res = DeserializeCheckResult <Dto>(responce.GetResponseStream());
        }
Exemple #3
0
 public Dto Echo(Dto dto)
 {
     return(dto);
 }
Exemple #4
0
 private static void O3Call(Dto dto, IGate pc)
 {
     pc.Echo(dto);
 }