Beispiel #1
0
        /// <summary>
        /// Creates a new instance of <see cref="PropertyAccessor{T}"/> with a specific underlying property value.
        /// </summary>
        /// <param name="value">The value of the property.</param>
        /// <param name="propertyAccessController">The access controller to use.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <param name="allowedAccess">The allowed access of the property.</param>
        internal PropertyAccessor(T value, PropertyAccessController propertyAccessController, string propertyName, BindingAccess allowedAccess)
        {
            this.propertyAccessController = propertyAccessController;
            this.allowedAccess            = allowedAccess;
            this.propertyName             = propertyName;

            this.value = value; //This bypasses change tracking and locking - but it's okay since we're in the constructor
        }
Beispiel #2
0
 /// <summary>
 /// Creates a new instance of a <see cref="PropertyCollection"/>.
 /// </summary>
 /// <param name="bindingState">The binding state for the collection.</param>
 protected PropertyCollection(BindingState bindingState)
 {
     this.propertyMetadata         = new List <IPropertyMetadata>();
     this.propertyAccessController = new PropertyAccessController(bindingState);
     this.isReadOnly = false;
 }
Beispiel #3
0
 /// <summary>
 /// Creates a new instance of <see cref="PropertyAccessor{T}"/> with the default underlying property value.
 /// </summary>
 /// <param name="propertyAccessController">The access controller to use.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="allowedAccess">The allowed access of the property.</param>
 internal PropertyAccessor(PropertyAccessController propertyAccessController, string propertyName, BindingAccess allowedAccess)
 {
     this.propertyAccessController = propertyAccessController;
     this.allowedAccess            = allowedAccess;
     this.propertyName             = propertyName;
 }