public RosterItem ToRosterItem()
		{
			var ri = new RosterItem(Jid, Name)
			{
				Subscription = Subscribtion,
				Ask = Ask,
			};
			Groups.ForEach(g => ri.AddGroup(g));
			return ri;
		}
Exemple #2
0
        public RosterItem ToRosterItem()
        {
            var ri = new RosterItem(Jid, Name)
            {
                Subscription = Subscribtion,
                Ask          = Ask,
            };

            Groups.ForEach(g => ri.AddGroup(g));
            return(ri);
        }
Exemple #3
0
 public RosterItem[] GetRoster()
 {
     ElementList nl = SelectElements(typeof (RosterItem));
     int i = 0;
     var result = new RosterItem[nl.Count];
     foreach (RosterItem ri in nl)
     {
         result[i] = ri;
         i++;
     }
     return result;
 }
		public static UserRosterItem FromRosterItem(RosterItem ri)
		{
			var item = new UserRosterItem(ri.Jid)
			{
				Name = ri.Name,
				Ask = ri.Ask,
				Subscribtion = ri.Subscription,
			};
			foreach (Element element in ri.GetGroups())
			{
				item.Groups.Add(element.Value);
			}
			return item;
		}
Exemple #5
0
        public static UserRosterItem FromRosterItem(RosterItem ri)
        {
            var item = new UserRosterItem(ri.Jid)
            {
                Name         = ri.Name,
                Ask          = ri.Ask,
                Subscribtion = ri.Subscription,
            };

            foreach (Element element in ri.GetGroups())
            {
                item.Groups.Add(element.Value);
            }
            return(item);
        }
Exemple #6
0
 public void AddRosterItem(RosterItem r)
 {
     ChildNodes.Add(r);
 }
Exemple #7
0
 public void AddRosterItem(RosterItem r)
 {
     ChildNodes.Add(r);
 }