public static Dto GetObject() { var dto = new Dto(); dto.StringMember = "String data"; dto.IntMember = 1133; dto.BoolMember = true; dto.DateTimeMember = DateTime.Now; return(dto); }
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()); }
public Dto Echo(Dto dto) { return(dto); }
private static void O3Call(Dto dto, IGate pc) { pc.Echo(dto); }