Пример #1
0
        public void Post(Message message)
        {
            var formatters = GlobalConfiguration.Configuration.Formatters;
            var jsonFormatter = formatters.JsonFormatter;
            var settings = jsonFormatter.SerializerSettings;
            settings.Formatting = Formatting.Indented;
            settings.ContractResolver = new CamelCasePropertyNamesContractResolver();

            var socket = SocketHelper.GetSocket();
            socket.Emit("chat message", JsonConvert.SerializeObject(message, settings));
        }
 public GroupsHistoryResponseModel()
 {
     messages = new Message[0];
 }