コード例 #1
0
        private void SendMessage(string action, int gatewayId, string gatewayname)
        {
            var data = new
            {
                type        = "Gateway",
                action      = action,
                gatewayId   = gatewayId,
                gatewayname = gatewayname
            };
            var logJson = JsonConvert.SerializeObject(data);

            YalgaarPubSub.SendMessage("gateway", logJson);
        }
コード例 #2
0
ファイル: NodeController.cs プロジェクト: TestNirav/C-Sharp-1
        private void SendMessage(string action, int gatewayId, int nodeId, string ndoename)
        {
            var data = new
            {
                type      = "Node",
                action    = action,
                nodeId    = nodeId,
                nodeName  = ndoename,
                gatewayId = gatewayId
            };
            var logJson = JsonConvert.SerializeObject(data);

            YalgaarPubSub.SendMessage("node", logJson);
        }