public void ReadXml(XmlReader reader)
        {
            this.presentities.Clear();

            while (reader.Read())
            {
                if (reader.Name == "presentitiesCollection" && reader.NodeType == XmlNodeType.EndElement)
                {
                    break;
                }

                if (reader.Name == "presentity")
                {
                    Presentity presentity = new Presentity();

                    if (reader.GetAttribute("version") == "0")
                    {
                        presentity.Uri         = reader.GetAttribute("uri");
                        presentity.DisplayName = reader.GetAttribute("name");
                        presentity.Group       = reader.GetAttribute("group");
                    }
                    else
                    {
                        presentity = null;
                    }

                    if (presentity != null)
                    {
                        this.presentities.Add(presentity);
                    }
                }
            }
        }
Beispiel #2
0
        public Endpoint(Dispatcher dispatcher)
            : base(dispatcher)
        {
            this.presentities = new PresentitiesCollection(true);
            this.presentities.PostCollectionChanged += Presenties_CollectionChanged;
            this.presentities.CollectionChanged     += Presenties_CollectionChanged2;

            this.Sessions = new ObservableCollection <ISession>();
            this.Sessions.CollectionChanged += Sessions_CollectionChanged;

            this.AvInvites = new ObservableCollection <AvInvite>();

            this.selfPresentity = new SelfPresentity();
            this.selfPresentity.PropertyChanged += SelfPresentity_PropertyChanged;

            this.selfPresentityMonitor = new Presentity();
            this.selfPresentityMonitor.PropertyChanged += SelfPresentityMonitor_PropertyChanged;

            this.Cleanup();
        }