MutablePropertyBaseExtensions MutablePropertyBaseExtensions Class

Definition

Extension methods for IMutablePropertyBase.

public static class MutablePropertyBaseExtensions
Public Module MutablePropertyBaseExtensions
Inheritance
System.ObjectSystem.Object
MutablePropertyBaseExtensionsMutablePropertyBaseExtensions

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Methods

SetField(IMutablePropertyBase, String) SetField(IMutablePropertyBase, String)

Sets the backing field to use for this property.

Backing fields are normally found by convention as described here: http://go.microsoft.com/fwlink/?LinkId=723277. This method is useful for setting backing fields explicitly in cases where the correct field is not found by convention.

By default, the backing field, if one is found or has been specified, is used when new objects are constructed, typically when entities are queried from the database. Properties are used for all other accesses. This can be changed by calling SetPropertyAccessMode(IMutablePropertyBase, Nullable<PropertyAccessMode>).

public static void SetField(this IMutablePropertyBase property, string fieldName)
<ExtensionAttribute>
Public Shared Sub SetField(property As IMutablePropertyBase, fieldName As String)
Parameters
property
IMutablePropertyBase IMutablePropertyBase

The property for which the backing field should be set.

fieldName
System.String System.String

The name of the field to use.

SetPropertyAccessMode(IMutablePropertyBase, Nullable) SetPropertyAccessMode(IMutablePropertyBase, Nullable(Of PropertyAccessMode))

Sets the PropertyAccessMode to use for this property.

public static void SetPropertyAccessMode(this IMutablePropertyBase property, PropertyAccessMode? propertyAccessMode)
<ExtensionAttribute>
Public Shared Sub SetPropertyAccessMode(property As IMutablePropertyBase, propertyAccessMode As PropertyAccessMode?)
Parameters
property
IMutablePropertyBase IMutablePropertyBase

The property for which to set the access mode.

propertyAccessMode
System.Nullable<PropertyAccessMode> System.Nullable(Of PropertyAccessMode)

The PropertyAccessMode, or null to clear the mode set.