mscorlib(4.0.0.0) API with additions
System.Dynamic.ConvertBinder Class Referenceabstract

Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation. More...

Inheritance diagram for System.Dynamic.ConvertBinder:
[legend]
Collaboration diagram for System.Dynamic.ConvertBinder:
[legend]

Public Member Functions

DynamicMetaObject FallbackConvert (DynamicMetaObject target)
 Performs the binding of the dynamic convert operation if the target dynamic object cannot bind. More...
 
abstract DynamicMetaObject FallbackConvert (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
 When overridden in the derived class, performs the binding of the dynamic convert operation if the target dynamic object cannot bind. More...
 
sealed override DynamicMetaObject Bind (DynamicMetaObject target, DynamicMetaObject[] args)
 Performs the binding of the dynamic convert operation. More...
 
- Public Member Functions inherited from System.Dynamic.DynamicMetaObjectBinder
sealed override Expression Bind (object[] args, ReadOnlyCollection< ParameterExpression > parameters, LabelTarget returnLabel)
 Performs the runtime binding of the dynamic operation on a set of arguments. More...
 
Expression GetUpdateExpression (Type type)
 Gets an expression that will cause the binding to be updated. It indicates that the expression's binding is no longer valid. This is typically used when the "version" of a dynamic object has changed. More...
 
DynamicMetaObject Defer (DynamicMetaObject target, params DynamicMetaObject[] args)
 Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. More...
 
DynamicMetaObject Defer (params DynamicMetaObject[] args)
 Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. More...
 
- Public Member Functions inherited from System.Runtime.CompilerServices.CallSiteBinder
virtual T BindDelegate< T > (CallSite< T > site, object[] args)
 Provides low-level runtime binding support. Classes can override this and provide a direct delegate for the implementation of rule. This can enable saving rules to disk, having specialized rules available at runtime, or providing a different caching policy. More...
 

Protected Member Functions

 ConvertBinder (Type type, bool @explicit)
 Initializes a new instance of the T:System.Dynamic.ConvertBinder. More...
 
- Protected Member Functions inherited from System.Dynamic.DynamicMetaObjectBinder
 DynamicMetaObjectBinder ()
 Initializes a new instance of the T:System.Dynamic.DynamicMetaObjectBinder class. More...
 
- Protected Member Functions inherited from System.Runtime.CompilerServices.CallSiteBinder
 CallSiteBinder ()
 Initializes a new instance of the T:System.Runtime.CompilerServices.CallSiteBinder class. More...
 
void CacheTarget< T > (T target)
 Adds a target to the cache of known targets. The cached targets will be scanned before calling BindDelegate to produce the new rule. More...
 

Properties

Type Type [get]
 The type to convert to. More...
 
bool Explicit [get]
 Gets the value indicating if the conversion should consider explicit conversions. More...
 
sealed override Type ReturnType [get]
 The result type of the operation. More...
 
- Properties inherited from System.Dynamic.DynamicMetaObjectBinder
virtual Type ReturnType [get]
 The result type of the operation. More...
 
- Properties inherited from System.Runtime.CompilerServices.CallSiteBinder
static LabelTarget UpdateLabel [get]
 Gets a label that can be used to cause the binding to be updated. It indicates that the expression's binding is no longer valid. This is typically used when the "version" of a dynamic object has changed. More...
 

Detailed Description

Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation.

Definition at line 7 of file ConvertBinder.cs.

Constructor & Destructor Documentation

◆ ConvertBinder()

System.Dynamic.ConvertBinder.ConvertBinder ( Type  type,
bool @  explicit 
)
protected

Initializes a new instance of the T:System.Dynamic.ConvertBinder.

Parameters
typeThe type to convert to.
explicitIs true if the conversion should consider explicit conversions; otherwise, false.

Definition at line 56 of file ConvertBinder.cs.

Member Function Documentation

◆ Bind()

sealed override DynamicMetaObject System.Dynamic.ConvertBinder.Bind ( DynamicMetaObject  target,
DynamicMetaObject []  args 
)
virtual

Performs the binding of the dynamic convert operation.

Parameters
targetThe target of the dynamic convert operation.
argsAn array of arguments of the dynamic convert operation.
Returns
The T:System.Dynamic.DynamicMetaObject representing the result of the binding.

Implements System.Dynamic.DynamicMetaObjectBinder.

Definition at line 84 of file ConvertBinder.cs.

◆ FallbackConvert() [1/2]

DynamicMetaObject System.Dynamic.ConvertBinder.FallbackConvert ( DynamicMetaObject  target)

Performs the binding of the dynamic convert operation if the target dynamic object cannot bind.

Parameters
targetThe target of the dynamic convert operation.
Returns
The T:System.Dynamic.DynamicMetaObject representing the result of the binding.

Definition at line 67 of file ConvertBinder.cs.

◆ FallbackConvert() [2/2]

abstract DynamicMetaObject System.Dynamic.ConvertBinder.FallbackConvert ( DynamicMetaObject  target,
DynamicMetaObject  errorSuggestion 
)
pure virtual

When overridden in the derived class, performs the binding of the dynamic convert operation if the target dynamic object cannot bind.

Parameters
targetThe target of the dynamic convert operation.
errorSuggestionThe binding result to use if binding fails, or null.
Returns
The T:System.Dynamic.DynamicMetaObject representing the result of the binding.

Property Documentation

◆ Explicit

bool System.Dynamic.ConvertBinder.Explicit
get

Gets the value indicating if the conversion should consider explicit conversions.

Returns
True if there is an explicit conversion, otherwise false.

Definition at line 30 of file ConvertBinder.cs.

◆ ReturnType

sealed override Type System.Dynamic.ConvertBinder.ReturnType
get

The result type of the operation.

Returns
The T:System.Type object representing the result type of the operation.

Definition at line 44 of file ConvertBinder.cs.

◆ Type

Type System.Dynamic.ConvertBinder.Type
get

The type to convert to.

Returns
The T:System.Type object that represents the type to convert to.

Definition at line 17 of file ConvertBinder.cs.


The documentation for this class was generated from the following file: