createMessage() публичный статический Метод

public static createMessage ( System.Methods meth, MessageTypes msgType, Message payload, string packageName, string remoteSourceSDK, string remoteApplicationID ) : RemoteMessage
meth System.Methods
msgType MessageTypes
payload Message
packageName string
remoteSourceSDK string
remoteApplicationID string
Результат RemoteMessage
Пример #1
0
        private string sendCommandMessage(Message payload, Methods method, int version = 1, string attachment = null, string attachmentEncoding = null, byte[] attachmentData = null, string attachmentUrl = null)
        {
            RemoteMessage rm = RemoteMessage.createMessage(method, MessageTypes.COMMAND, payload, this.packageName, remoteSourceSDK, remoteApplicationID);

            rm.attachment         = attachment;
            rm.attachmentEncoding = attachmentEncoding;

            return(sendRemoteMessage(rm, version, attachmentData, attachmentUrl, attachmentEncoding));
        }
Пример #2
0
        private string sendObjectMessage(Message message)
        {
            RemoteMessage remoteMessage = RemoteMessage.createMessage(message.method, MessageTypes.COMMAND, message, this.packageName, remoteSourceSDK, remoteApplicationID);
            string        msg           = JsonUtils.SerializeSdk(remoteMessage);

            transport.sendMessage(msg);
#if DEBUG
            Console.WriteLine("Sent message: " + msg);
#endif
            return(remoteMessage.id);
        }