C# Class Microsoft.Scripting.BindingRestrictions

Mostrar archivo Open project: runefs/Marvin

Private Properties

Property Type Description
BindingRestrictions System
GetExpression 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
GetExpression ( ) : Expression
GetTypeRestriction ( Microsoft.Scripting.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 Expression The expression expression 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 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 Expression The expression to test.
type System.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 Expression