Exemplo n.º 1
0
 void IManagedPropertyMetadataInternal.RaisePropertyChangedMetaEvent(ManagedPropertyObject sender, ManagedPropertyChangedEventArgs e)
 {
     if (this._propertyChangedCallBack != null)
     {
         this._propertyChangedCallBack(sender, e);
     }
 }
Exemplo n.º 2
0
        void IManagedPropertyInternal.RaiseReadOnlyPropertyChanged(ManagedPropertyObject sender, ManagedPropertyChangedSource source)
        {
            //直接装箱,以免下行代码装箱两次。
            object nonValue = default(TPropertyType);

            sender.RaisePropertyChanged(new ManagedPropertyChangedEventArgs(this, nonValue, nonValue, source));
        }
Exemplo n.º 3
0
 internal CompiledPropertyValuesEnumerator(ManagedPropertyObject mpo)
 {
     _index      = -1;
     _mpo        = mpo;
     _current    = new ManagedPropertyField();
     _properties = mpo.PropertiesContainer.GetCompiledProperties();
 }
Exemplo n.º 4
0
 internal NonDefaultPropertyValuesEnumerator(ManagedPropertyObject mpo)
 {
     _index                  = -1;
     _mpo                    = mpo;
     _current                = new ManagedPropertyField();
     _runtimeFields          = null;
     _enumerateRuntimeFields = false;
 }
Exemplo n.º 5
0
        object IManagedPropertyMetadataInternal.CoerceGetValue(ManagedPropertyObject sender, object value)
        {
            if (this._coerceGetValueCallBack != null)
            {
                return(this._coerceGetValueCallBack(sender, (TPropertyType)value));
            }

            return(value);
        }
Exemplo n.º 6
0
        internal TPropertyType CoerceGetValue(ManagedPropertyObject sender, TPropertyType value)
        {
            if (this._coerceGetValueCallBack != null)
            {
                return(this._coerceGetValueCallBack(sender, value));
            }

            return(value);
        }
Exemplo n.º 7
0
        internal bool RaisePropertyChangingMetaEvent(ManagedPropertyObject sender, ref TPropertyType value, ManagedPropertyChangedSource source)
        {
            if (this._propertyChangingCallBack != null)
            {
                var e = new ManagedPropertyChangingEventArgs <TPropertyType>(this._property, value, source);

                this._propertyChangingCallBack(sender, e);

                if (e.HasCoercedValue)
                {
                    value = e.CoercedValue;
                }

                return(e.Cancel);
            }

            return(false);
        }
Exemplo n.º 8
0
 object IManagedPropertyInternal.ProvideReadOnlyValue(ManagedPropertyObject component)
 {
     return(this._readOnlyValueProvider(component));
 }
 public ManagedPropertyObjectTypeProxy(ManagedPropertyObject mpo)
 {
     _mpo = mpo;
 }
Exemplo n.º 10
0
 void IValidationRule.Validate(ManagedPropertyObject entity, RuleArgs e)
 {
     this.Validate(entity as Entity, e);
 }
 public ManagedPropertyObjectTypeProxy(ManagedPropertyObject mpo)
 {
     _mpo = mpo;
 }