Ejemplo n.º 1
0
 public void Deserialize(IPofReader reader)
 {
     invocationId     = reader.ReadU32(0);
     serviceGuid      = reader.ReadGuid(1);
     methodName       = reader.ReadString(2);
     genericArguments = reader.ReadObject <PortableObjectBox>(3);
     methodArguments  = reader.ReadObject <PortableObjectBox>(4);
 }
Ejemplo n.º 2
0
 public bool TryConvertFromDataTransferObject <T>(PortableObjectBox dto, out T methodArguments)
 {
     using (var ms = streamFactory.CreateMemoryStream(dto.Buffer, dto.Offset, dto.Length)) {
         try {
             methodArguments = (T)pofSerializer.Deserialize(ms.Reader);
             return(true);
         } catch (TypeNotFoundException) {
             methodArguments = default(T);
             return(false);
         }
     }
 }
Ejemplo n.º 3
0
 public X2XServiceInvocation(
     uint invocationId,
     Guid serviceGuid,
     string methodName,
     PortableObjectBox genericArguments,
     PortableObjectBox methodArguments
     )
 {
     this.invocationId     = invocationId;
     this.serviceGuid      = serviceGuid;
     this.methodName       = methodName;
     this.genericArguments = genericArguments;
     this.methodArguments  = methodArguments;
 }
Ejemplo n.º 4
0
 public void Deserialize(IPofReader reader)
 {
     invocationId = reader.ReadU32(0);
     payloadBox   = reader.ReadObject <PortableObjectBox>(1);
 }
Ejemplo n.º 5
0
 public X2XInvocationResult(uint invocationId, PortableObjectBox payloadBox)
 {
     this.invocationId = invocationId;
     this.payloadBox   = payloadBox;
 }
Ejemplo n.º 6
0
        public Task SendServiceInvocationAsync(uint invocationId, Guid serviceGuid, string methodName, PortableObjectBox genericArgumentsDto, PortableObjectBox methodArgumentsDto)
        {
            var message = new X2XServiceInvocation(invocationId, serviceGuid, methodName, genericArgumentsDto, methodArgumentsDto);

            pofStreamWriter.Write(message);
            return(Task.FromResult <object>(null));
        }