Exemple #1
0
		public MucRoom(Jid jid, string name, MucService mucService, IServiceProvider context)
		{
			if (jid == null)
			{
				throw new ArgumentNullException("jid");
			}
			if (mucService == null)
			{
				throw new ArgumentNullException("mucService");
			}
			if (context == null)
			{
				throw new ArgumentNullException("context");
			}
			this.mucService = mucService;
			this.context = context;
			Jid = jid;
			Name = name;
			members = new MucRoomMemberCollection(mucService.ServiceManager);
			members.MemberAdded += BroadcastPresencesToMember;
			members.MemberRemoved += members_MemberRemoved;

			//Create handler
			Handlers.Add(new MucRoomStanzaHandler(this));
			Handlers.Add(new ServiceDiscoHandler(Jid));
		}
Exemple #2
0
        public MucRoom(Jid jid, string name, MucService mucService, IServiceProvider context)
        {
            if (jid == null)
            {
                throw new ArgumentNullException("jid");
            }
            if (mucService == null)
            {
                throw new ArgumentNullException("mucService");
            }
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            this.mucService        = mucService;
            this.context           = context;
            Jid                    = jid;
            Name                   = name;
            members                = new MucRoomMemberCollection(mucService.ServiceManager);
            members.MemberAdded   += BroadcastPresencesToMember;
            members.MemberRemoved += members_MemberRemoved;

            //Create handler
            Handlers.Add(new MucRoomStanzaHandler(this));
            Handlers.Add(new ServiceDiscoHandler(Jid));
        }