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); }
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); }