Archetype.MetaObjects.DelegatingMetaObject.CreateBoundDynamicMetaObject C# (CSharp) Метод

CreateBoundDynamicMetaObject() защищенный Метод

Performs the binding of the dynamic operation and relaxes the type restrictions for the target of the delegation.
When bindings are evaluated, they are restricted to the type being operated upon. In order to support delegation to other types, we have to relax the type restrictions on the DynamicMetaObject.
protected CreateBoundDynamicMetaObject ( DynamicMetaObject>.Func bindTarget, object target ) : DynamicMetaObject
bindTarget DynamicMetaObject>.Func /// Performs the binding of the dynamic operation if the target dynamic object cannot bind. /// The target of the dynamic operation.
target object The target of the dynamic operation.
Результат DynamicMetaObject
        protected virtual DynamicMetaObject CreateBoundDynamicMetaObject(
            Func<DynamicMetaObject, DynamicMetaObject> bindTarget,
            object target)
        {
            DynamicMetaObject metaObject = Create( target, Expression.Constant( target ) );
            DynamicMetaObject boundMetaObject = bindTarget( metaObject );
            DynamicMetaObject result = RelaxTypeRestrictions( boundMetaObject, boundMetaObject.Value );
            return result;
        }