public LectionRatingRepository() { /*List<Tuple<string, int>> tuples = new List<Tuple<string, int>>(); * tuples.Add(new Tuple<string, int>("test", 1)); * Add(new LectionRating { Id = "guid1", Votes = tuples });*/ notifications = new NotificationHubProxy(null); }
public PushNotificationsController( IOptions <NotificationHubConfiguration> standardNotificationHubConfiguration, IHubContext <WebNotificationHub, ITypedHubClient> hubSignalRContext, UserRepository userContext, IExceptionHandler exceptionHandler) { _notificationHubProxy = new NotificationHubProxy(standardNotificationHubConfiguration.Value, userContext); _hubSignalRContext = hubSignalRContext; this.userContext = userContext; this.exceptionHandler = exceptionHandler; }
public async Task <ActionResult <User> > PostUser(User user) { _context.Users.Add(user); await _context.SaveChangesAsync(); await _context.SaveChangesAsync(); NotificationHubProxy _notificationHubProxy = new NotificationHubProxy(standardNotificationHubConfiguration); NotificationHubs.Notification newNotification = new NotificationHubs.Notification(); newNotification.Content = "New user created: id = " + user.Id; newNotification.Title = "New user"; HubResponse <NotificationOutcome> pushDeliveryResult = await _notificationHubProxy.SendNotification(newNotification); if (pushDeliveryResult.CompletedWithSuccess) { Console.WriteLine("Push Message Succesful"); } return(CreatedAtAction("GetUser", new { id = user.Id }, user)); }
public NotificationEventHandler(Microsoft.Extensions.Options.IOptions <NotificationHubConfiguration> standardNotificationHubConfiguration, UserRepository userContext) { _notificationHubProxy = new NotificationHubProxy(standardNotificationHubConfiguration.Value, userContext); }
public PushNotificationsController(IOptions <NotificationHubConfiguration> standardNotificationHubConfiguration) { _notificationHubProxy = new NotificationHubProxy(standardNotificationHubConfiguration.Value); }
public MessageRepository() { notifications = new NotificationHubProxy(null); }
public PlantsController(ApplicationDbContext context, IOptions <AppSettings> settings) { _settings = settings.Value; _context = context; _notificationHubProxy = new NotificationHubProxy(_context, settings); }
public HomeController(ILogger <HomeController> logger, IOptions <NotificationHubConfiguration> standardNotificationHubConfiguration) { _logger = logger; _notificationHubProxy = new NotificationHubProxy(standardNotificationHubConfiguration.Value); }