public void AddNotification(NotificationObject notification) { Clients.All.addNotification(JsonConvert.SerializeObject(notification, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
static void AddNotification(string message) { var newNotification = new NotificationObject { Id = _notificationObjects.Count, Message = message }; _notificationObjects.Add(newNotification); _hubProxy.Invoke("AddNotification", newNotification).Wait(); }