예제 #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);
        }
예제 #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());
        }
예제 #3
0
파일: Gate.cs 프로젝트: sharkbrainguy/Ogam3
 public Dto Echo(Dto dto)
 {
     return(dto);
 }
예제 #4
0
 private static void O3Call(Dto dto, IGate pc)
 {
     pc.Echo(dto);
 }