/// <summary> /// Create a client registration for a certain event type. /// </summary> /// <param name="clientUri"></param> /// <param name="eventType"></param> /// <param name="userName"></param> /// <param name="prox"></param> public void RegisterClient(Uri clientUri, NotificationTypes eventType, string userName, IClientNotification prox) { var reg = new Registration() { RegistrationUri = clientUri, EventType = eventType.ToString(), UserName = userName, clientProxy=prox }; var key = reg.CreateKey(); if (!Registrations.ContainsKey(key)) Registrations.Add(key, new List<Registration> { reg }); else if (Registrations[key].Find(rg => (rg.RegistrationUri.AbsolutePath == reg.RegistrationUri.AbsolutePath)) == null) Registrations[key].Add(reg); }
public BaseController(IClientNotification clientNotification) { _clientNotification = clientNotification; }
public MaterialStockController(ApplicationDbContext context, IClientNotification client) { _context = context; _client = client; }
public CarBrandController(IClientNotification clientNotification, IUserprofileRepository IUserprofileRepository, UserManager <ApplicationUser> userManager) { _clientNotification = clientNotification; _userManager = userManager; _IUserprofileRepository = IUserprofileRepository; }
public PurchaseController(ApplicationDbContext context, IClientNotification client) { _context = context; _client = client; }