Exemplo n.º 1
0
        public static string GetOutput(this Devices.Routing.Core.IMessage routingMessage)
        {
            if (routingMessage.SystemProperties.TryGetValue(SystemProperties.OutputName, out string outputName))
            {
                return(outputName);
            }

            return(string.Empty);
        }
Exemplo n.º 2
0
        public static string GetSenderId(this Devices.Routing.Core.IMessage routingMessage)
        {
            if (routingMessage.SystemProperties.TryGetValue(SystemProperties.ConnectionDeviceId, out string deviceId))
            {
                return(routingMessage.SystemProperties.TryGetValue(SystemProperties.ConnectionModuleId, out string moduleId)
                    ? $"{deviceId}/{moduleId}"
                    : deviceId);
            }

            return(string.Empty);
        }