C# Class System.Dynamic.BindingRestrictions

Show file Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
BindingRestrictions System.Collections.Generic
GetExpression System.Linq.Expressions.Expression
GetTypeRestriction BindingRestrictions

Public Methods

Method Description
Combine ( IList contributingObjects ) : BindingRestrictions

Combines binding restrictions from the list of DynamicMetaObject instances into one set of restrictions.

GetExpressionRestriction ( Expression expression ) : BindingRestrictions

Creates the binding restriction that checks the expression for arbitrary immutable properties.

By convention, the general restrictions created by this method must only test immutable object properties.

GetInstanceRestriction ( Expression expression, object instance ) : BindingRestrictions

Creates the binding restriction that checks the expression for object instance identity.

GetTypeRestriction ( Expression expression, Type type ) : BindingRestrictions

Creates the binding restriction that check the expression for runtime type identity.

Merge ( BindingRestrictions restrictions ) : BindingRestrictions

Merges the set of binding restrictions with the current binding restrictions.

ToExpression ( ) : Expression

Creates the Expression representing the binding restrictions.

Private Methods

Method Description
BindingRestrictions ( ) : System.Collections.Generic
GetExpression ( ) : Expression
GetTypeRestriction ( DynamicMetaObject obj ) : BindingRestrictions

The method takes a DynamicMetaObject, and returns an instance restriction for testing null if the object holds a null value, otherwise returns a type restriction.

Method Details

Combine() public static method

Combines binding restrictions from the list of DynamicMetaObject instances into one set of restrictions.
public static Combine ( IList contributingObjects ) : BindingRestrictions
contributingObjects IList The list of instances from which to combine restrictions.
return BindingRestrictions

GetExpressionRestriction() public static method

Creates the binding restriction that checks the expression for arbitrary immutable properties.
By convention, the general restrictions created by this method must only test immutable object properties.
public static GetExpressionRestriction ( Expression expression ) : BindingRestrictions
expression System.Linq.Expressions.Expression The expression expressing the restrictions.
return BindingRestrictions

GetInstanceRestriction() public static method

Creates the binding restriction that checks the expression for object instance identity.
public static GetInstanceRestriction ( Expression expression, object instance ) : BindingRestrictions
expression System.Linq.Expressions.Expression The expression to test.
instance object The exact object instance to test.
return BindingRestrictions

GetTypeRestriction() public static method

Creates the binding restriction that check the expression for runtime type identity.
public static GetTypeRestriction ( Expression expression, Type type ) : BindingRestrictions
expression System.Linq.Expressions.Expression The expression to test.
type Type The exact type to test.
return BindingRestrictions

Merge() public method

Merges the set of binding restrictions with the current binding restrictions.
public Merge ( BindingRestrictions restrictions ) : BindingRestrictions
restrictions BindingRestrictions The set of restrictions with which to merge the current binding restrictions.
return BindingRestrictions

ToExpression() public method

Creates the Expression representing the binding restrictions.
public ToExpression ( ) : Expression
return System.Linq.Expressions.Expression