public UniqueComponentListProxy(IGroupedCollection <string, ICalendarObject> children) : base(children)
        {
            _lookup = new Dictionary <string, TComponentType>();

            children.ItemAdded   += children_ItemAdded;
            children.ItemRemoved += children_ItemRemoved;
        }
        public void Setup()
        {
            _JonSchmidt = new Person()
            {
                Group = 1, Name = "Jon Schmidt"
            };
            _BobRoss = new Person()
            {
                Group = 2, Name = "Bob Ross"
            };
            _ForrestGump = new Doctor()
            {
                Group = 3, Name = "Forrest Gump", ProviderNumber = "123456"
            };
            _MichaelJackson = new Person()
            {
                Group = 4, Name = "Michael Jackson"
            };
            _DoogieHowser = new Doctor()
            {
                Group = 5, Name = "Doogie Howser", ProviderNumber = "234567"
            };

            _People = new GroupedList <long, Person>();

            _People.Add(_ForrestGump);
            _People.Add(_JonSchmidt);
            _People.Add(_BobRoss);
            _People.Add(_DoogieHowser);
            _People.Add(_MichaelJackson);

            _Doctors = new GroupedCollectionProxy <long, Person, Doctor>(_People);
        }
Пример #3
0
        public UniqueComponentListProxy(IGroupedCollection <string, ICalendarObject> children) : base(children)
        {
            _Lookup = new Dictionary <string, TComponentType>();

            children.ItemAdded   += new EventHandler <ObjectEventArgs <ICalendarObject, int> >(children_ItemAdded);
            children.ItemRemoved += new EventHandler <ObjectEventArgs <ICalendarObject, int> >(children_ItemRemoved);
        }
        public GroupedCollectionProxy(IGroupedCollection <TGroup, TOriginal> realObject, Func <TNew, bool> predicate)
        {
            m_predicate = predicate ?? (o => true);
            SetProxiedObject(realObject);

            m_realObject.ItemAdded   += _RealObject_ItemAdded;
            m_realObject.ItemRemoved += _RealObject_ItemRemoved;
        }
Пример #5
0
        public GroupedCollectionProxy(IGroupedCollection <TGroup, TOriginal> realObject, Func <TNew, bool> predicate = null)
        {
            _Predicate = predicate ?? new Func <TNew, bool>(o => true);
            SetProxiedObject(realObject);

            _RealObject.ItemAdded   += new EventHandler <ObjectEventArgs <TOriginal, int> >(_RealObject_ItemAdded);
            _RealObject.ItemRemoved += new EventHandler <ObjectEventArgs <TOriginal, int> >(_RealObject_ItemRemoved);
        }
        public void Setup()
        {
            _JonSchmidt = new Person() { Group = 1, Name = "Jon Schmidt" };
            _BobRoss = new Person() { Group = 2, Name = "Bob Ross" };
            _ForrestGump = new Doctor() { Group = 3, Name = "Forrest Gump", ProviderNumber = "123456" };
            _MichaelJackson = new Person() { Group = 4, Name = "Michael Jackson" };
            _DoogieHowser = new Doctor() { Group = 5, Name = "Doogie Howser", ProviderNumber = "234567" };

            _People = new GroupedList<long, Person>();

            _People.Add(_ForrestGump);
            _People.Add(_JonSchmidt);
            _People.Add(_BobRoss);
            _People.Add(_DoogieHowser);
            _People.Add(_MichaelJackson);

            _Doctors = new GroupedCollectionProxy<long, Person, Doctor>(_People);
        }
Пример #7
0
 public GroupedCollectionProxy(IGroupedCollection <TGroup, TOriginal> realObject, Func <TNew, bool> predicate = null)
 {
     _predicate = predicate ?? (o => true);
     SetProxiedObject(realObject);
 }
Пример #8
0
 public virtual void SetProxiedObject(IGroupedCollection <TGroup, TOriginal> realObject)
 {
     RealObject = realObject;
 }
 public UniqueComponentListProxy(IGroupedCollection <string, ICalendarObject> children) : base(children)
 {
     _lookup = new Dictionary <string, TComponentType>();
 }
Пример #10
0
 public CalendarObjectListProxy(IGroupedCollection <string, ICalendarObject> list) : base(list)
 {
 }
 public GroupedCollectionProxy(IGroupedCollection <TGroup, TOriginal> realObject)
     : this(realObject, null)
 {
 }
Пример #12
0
 public GroupedCollectionScope(IGroupedCollection <TEntity> collection)
     : base(collection.Cache.Graph)
 {
     _collection = collection;
 }