Esempio n. 1
0
        public WCFService(SipServerConfigurationSection configuration, EnhancedPresence1 enhancedPresence, TrunkManager trunkManager, Accountx accounts, IUserz userz)
        {
            this.accounts = accounts;

            this.userz = userz;
            this.userz.Reset += IUsers_Reloaded;
            this.userz.Added += IUsers_Added;
            this.userz.Updated += IUsers_Updated;
            this.userz.Removed += IUsers_Removed;

            this.enhancedPresence = enhancedPresence;
            this.enhancedPresence.AvailabilityChanged += AvailabilityChanged;

            this.trunkManager = trunkManager;
            this.trunkManager.TrunkUpdated += TrunkUpdated;

            this.serviceAddress = configuration.WcfServiceAddress;
            //this.domainName = configuration.DomainName;
            this.validator = new CustomUserNamePasswordValidator(@"administrator", configuration.AdministratorPassword);
        }
Esempio n. 2
0
		public MsPresTU(IAccounts accounts, IUserz userz, LocationService locationService)
		{
			this.accounts = accounts;
			this.userz = userz;
			this.locationService = locationService;
			this.enhancedPresence = new EnhancedPresence1(BenotifyHandler);
			this.dialogManager = new DialogManager();

			locationService.AorAdded += LocationService_AorAdded;
			locationService.AorRemoved += LocationService_AorRemoved;
			locationService.ContactAdded += LocationService_ContactAdded;
			locationService.ContactRemoved += LocationService_ContactRemoved;

			userz.Updated += Users_AddedOrUpdated;
			userz.Added += Users_AddedOrUpdated;
			userz.Reset += Users_Reset;

			accounts.ForEach((account) =>
			{
				for (int i = 0; i < userz.Count; i++)
					ResetUsers(userz[i], account);
			});
		}