예제 #1
0
        public void SendItemType(EnumItemType type, string projectid = null)
        {
            var payload    = new Payload(type, new List <string>(), projectid);
            var cowMessage = new CowMessage(EnumAction.newList, _clientGuid, payload);

            Send(cowMessage);
        }
예제 #2
0
        private void Send(CowMessage cowMessage)
        {
            var cowStringEnumConvertor = new StringEnumConverter {
                CamelCaseText = false
            };
            var jsonSerializerSettings = new JsonSerializerSettings
            {
                Formatting        = Formatting.None,
                NullValueHandling = NullValueHandling.Ignore
            };

            jsonSerializerSettings.Converters.Add(cowStringEnumConvertor);
            var message = JsonConvert.SerializeObject(cowMessage, jsonSerializerSettings);

            _proxy.Invoke("Send", message);
        }