Beispiel #1
0
        public ScopeArgBinder To <THandler>(Func <THandler, Action> methodGetter)
        {
            Finalizer = new CommandBindingFinalizer <TCommand, THandler>(
                BindInfo, methodGetter,
                (container) => new TransientProvider(
                    typeof(THandler), container, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.ContextInfo));

            return(new ScopeArgBinder(BindInfo));
        }
Beispiel #2
0
        public ScopeArgBinder To <THandler>(Func <THandler, ModestTree.Util.Action <TParam1, TParam2, TParam3, TParam4, TParam5> > methodGetter)
        {
            Finalizer = new CommandBindingFinalizer <TCommand, THandler, TParam1, TParam2, TParam3, TParam4, TParam5>(
                BindInfo, methodGetter,
                (container) => new TransientProvider(
                    typeof(THandler), container, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.ContextInfo));

            return(new ScopeArgBinder(BindInfo));
        }
Beispiel #3
0
        ScopeBinder ToResolveInternal <THandler>(
            string identifier, Func <THandler, ModestTree.Util.Action <TParam1, TParam2, TParam3, TParam4, TParam5> > methodGetter, bool optional)
        {
            Finalizer = new CommandBindingFinalizer <TCommand, THandler, TParam1, TParam2, TParam3, TParam4, TParam5>(
                BindInfo, methodGetter,
                (container) => new ResolveProvider(typeof(THandler), container, identifier, optional));

            return(new ScopeBinder(BindInfo));
        }
        ScopeBinder ToResolveInternal <THandler>(
            string identifier, Func <THandler, Action> methodGetter, bool optional)
        {
            Finalizer = new CommandBindingFinalizer <TCommand, THandler>(
                BindInfo, methodGetter,
                (container) => new ResolveProvider(typeof(THandler), container, identifier, optional));

            return(new ScopeBinder(BindInfo));
        }