Example #1
0
        public ObjectPersistData(ControlBuilder builder, IDictionary builtObjects)
        {
            _objectType  = builder.ControlType;
            _localize    = builder.Localize;
            _resourceKey = builder.GetResourceKey();

            _builtObjects = builtObjects;

            if (typeof(ICollection).IsAssignableFrom(_objectType))
            {
                _isCollection = true;
            }

            _collectionItems         = new ArrayList();
            _propertyTableByFilter   = new HybridDictionary(true);
            _propertyTableByProperty = new HybridDictionary(true);
            _allPropertyEntries      = new ArrayList();
            _eventEntries            = new ArrayList();

            foreach (PropertyEntry entry in builder.SimplePropertyEntries)
            {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.ComplexPropertyEntries)
            {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.TemplatePropertyEntries)
            {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.BoundPropertyEntries)
            {
                AddPropertyEntry(entry);
            }

            foreach (EventEntry entry in builder.EventEntries)
            {
                AddEventEntry(entry);
            }
        }
        public ObjectPersistData(ControlBuilder builder, IDictionary builtObjects) {
            _objectType = builder.ControlType;
            _localize = builder.Localize;
            _resourceKey = builder.GetResourceKey();

            _builtObjects = builtObjects;

            if (typeof(ICollection).IsAssignableFrom(_objectType)) {
                _isCollection = true;
            }

            _collectionItems = new ArrayList();
            _propertyTableByFilter = new HybridDictionary(true);
            _propertyTableByProperty = new HybridDictionary(true);
            _allPropertyEntries = new ArrayList();
            _eventEntries = new ArrayList();

            foreach (PropertyEntry entry in builder.SimplePropertyEntries) {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.ComplexPropertyEntries) {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.TemplatePropertyEntries) {
                AddPropertyEntry(entry);
            }

            foreach (PropertyEntry entry in builder.BoundPropertyEntries) {
                AddPropertyEntry(entry);
            }

            foreach (EventEntry entry in builder.EventEntries) {
                AddEventEntry(entry);
            }
        }