Exemplo n.º 1
0
 public RosterItem(XmppAddress address, string name, RosterSubscriptionType subscription)
     : this()
 {
     this.Jid          = address.BareAddress;
     this.Name         = name;
     this.Subscription = subscription;
 }
Exemplo n.º 2
0
 public RosterItem(XmppAddress address
                   , string name
                   , RosterSubscriptionType subscription
                   , IEnumerable <string> groups)
     : this(address, name, subscription)
 {
     this.Groups.AddRange(groups);
 }
Exemplo n.º 3
0
        internal void Update(string name, RosterSubscriptionType subscription, IEnumerable <string> groups)
        {
            this.Name         = ((name == null) ? String.Empty : name);
            this.DisplayName  = (!String.IsNullOrEmpty(this.Name) ? this.Name : this.address.UserName);
            this.Subscription = subscription;

            if (groups != null && groups.Count() > 0)
            {
                this.groups.AddRange(groups);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:XmppContact"/> class.
        /// </summary>
        /// <param name="address">The contact address.</param>
        /// <param name="name">The contact name.</param>
        /// <param name="subscription">The contact subscription mode.</param>
        /// <param name="groups">The contact groups.</param>
        internal Contact(XmppAddress address
                         , string name
                         , RosterSubscriptionType subscription
                         , IEnumerable <string> groups)
        {
            this.address               = address.BareAddress;
            this.groups                = new List <string>();
            this.resources             = new List <ContactResource>();
            this.blockingStream        = new Subject <ContactBlockingAction>();
            this.newResourceStream     = new Subject <ContactResource>();
            this.removedResourceStream = new Subject <ContactResource>();

            this.Update(name, subscription, groups);
            this.AddDefaultResource();

            this.SubscribeToPresenceChanges();
        }
Exemplo n.º 5
0
 public RosterItem(XmppAddress address, string name, RosterSubscriptionType subscription, string group)
     : this(address, name, subscription)
 {
     this.Groups.Add(group);
 }
Exemplo n.º 6
0
 public RosterItem()
 {
     this.Subscription = RosterSubscriptionType.None;
     this.Groups       = new List <string>();
 }