public RosterItem(XmppAddress address, string name, RosterSubscriptionType subscription) : this() { this.Jid = address.BareAddress; this.Name = name; this.Subscription = subscription; }
public RosterItem(XmppAddress address , string name , RosterSubscriptionType subscription , IEnumerable <string> groups) : this(address, name, subscription) { this.Groups.AddRange(groups); }
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); } }
/// <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(); }
public RosterItem(XmppAddress address, string name, RosterSubscriptionType subscription, string group) : this(address, name, subscription) { this.Groups.Add(group); }
public RosterItem() { this.Subscription = RosterSubscriptionType.None; this.Groups = new List <string>(); }