Exemplo n.º 1
0
 public PacketContent(JsonContent jsonContent)
 {
     this.JsonContent = jsonContent;
     this.ContentType = ContentType.Json;
 }
Exemplo n.º 2
0
 public static SerializedInfo CreateForJson(Session session, string clientInvokeId, JsonContent content)
 {
     SerializedInfo target = new SerializedInfo()
     {
         Content=new PacketContent(content),
         ClientInfo=new ClientInfo(clientInvokeId,session)
     };
     return target;
 }
Exemplo n.º 3
0
 private static SerializedInfo ParseJsonPacket(Session session, string content)
 {
     JsonContent jsonContent = new JsonContent(request:JObject.Parse(content));
     var clientInvokeIdProperty = jsonContent.Request[RequestConstants.InvokeIdNodeName];
     string clientInvokeId = clientInvokeIdProperty == null ? string.Empty : clientInvokeIdProperty.ToString();
     return SerializedInfo.CreateForJson(session, clientInvokeId, jsonContent);
 }