示例#1
0
        public Task SendMessage <T>(T message, ProtoOAPayloadType payloadType, string clientMsgId = null) where T :
        IMessage <T>
        {
            var protoMessage = ProtoMessageGenerator.GetProtoMessage(payloadType, message.ToByteString(), clientMsgId);

            return(SendMessage(protoMessage));
        }
示例#2
0
        public Task SendMessage <T>(T message, ProtoOAPayloadType payloadType, string clientMsgId = null) where T :
        IMessage
        {
            var protoMessage = MessageFactory.GetMessage(message, payloadType, clientMsgId);

            return(SendMessage(protoMessage));
        }
示例#3
0
 /// <summary>
 /// Returns a ProtoMessage based on your provided parameters (for ProtoOAPayloadType message types)
 /// </summary>
 /// <typeparam name="T">The payload message type</typeparam>
 /// <param name="message">The ProtoMessage message payload message</param>
 /// <param name="payloadType">The ProtoMessage message payload type</param>
 /// <param name="clientMessageId">The client message ID for ProtoMessage</param>
 /// <returns>ProtoMessage</returns>
 public static ProtoMessage GetMessage <T>(this T message, ProtoOAPayloadType payloadType,
                                           string clientMessageId = null) where T : IMessage
 {
     return(GetMessage((uint)payloadType, message.ToByteString(), clientMessageId));
 }
示例#4
0
 public static ProtoMessage GetProtoMessage(ProtoOAPayloadType payloadType, ByteString payload,
                                            string clientMessageId = null)
 {
     return(GetProtoMessage((uint)payloadType, payload, clientMessageId));
 }