Archetype.MetaObjects.ModuleMetaObject.Resolve C# (CSharp) 메소드

Resolve() 보호된 메소드

Implemented by inheritors, this function should determine the receiver for the binding of the dynamic operation and use the bindTarget to perform the binding and return the result of that binding operation.
The bindTarget can be used multiple times to attempt potential binding operations.
protected Resolve ( DynamicMetaObject>.Func bindTarget ) : DynamicMetaObject
bindTarget DynamicMetaObject>.Func /// Performs the binding of the dynamic operation if the target dynamic object cannot bind. /// The target of the dynamic operation.
리턴 System.Dynamic.DynamicMetaObject
        protected override DynamicMetaObject Resolve( Func<DynamicMetaObject, DynamicMetaObject> bindTarget )
        {
            // The modules are processed in reverse to preserve a LIFO ordering. This first module to successfully bind wins.
            for ( int index = _Modules.Count - 1; index >= 0; index-- )
            {
                object module = _Modules[index];
                DynamicMetaObject metaObject = CreateBoundDynamicMetaObject( bindTarget, module );

                if ( BindingHasFailed( metaObject ) )
                {
                    continue;
                }

                return metaObject;
            }
            return null;
        }