Exemple #1
0
        public ManagedProperty(Type ownerType, Type declareType, string propertyName, ManagedPropertyMetadata <TPropertyType> defaultMeta)
        {
            if (ownerType == null)
            {
                throw new ArgumentNullException("ownerType");
            }
            if (declareType == null)
            {
                throw new ArgumentNullException("declareType");
            }
            if (string.IsNullOrEmpty(propertyName))
            {
                throw new ArgumentNullException("propertyName");
            }
            if (defaultMeta == null)
            {
                throw new ArgumentNullException("defaultMeta");
            }

            this._typeCompiledIndex = -1;
            this.GlobalIndex        = -1;
            this.LifeCycle          = ManagedPropertyLifeCycle.Compile;
            this.OwnerType          = ownerType;
            this.DeclareType        = declareType;
            this._defaultMeta       = defaultMeta;
            this._defaultMeta.SetProperty(this);
            this.Name = propertyName;
            if (ownerType != declareType)
            {
                this.IsExtension = true;
            }
        }
Exemple #2
0
 public ManagedProperty(Type ownerType, string propertyName, ManagedPropertyMetadata <TPropertyType> defaultMeta)
     : this(ownerType, ownerType, propertyName, defaultMeta)
 {
 }