コード例 #1
0
        private ConstructorInfo Select(IEnumerable<ConstructorInfo> constructors, ArgumentContainer arguments, params Type[] registeredTypes)
        {
            var selector = new LightCore.Activation.Components.ConstructorSelector();

            var resolutionContext =
                new LightCore.Activation.ResolutionContext(
                    null,
                    RegistrationHelper.GetRegistrationContainerFor(registeredTypes),
                    arguments,
                    new ArgumentContainer());

            return selector
                .SelectConstructor(constructors, resolutionContext);
        }
コード例 #2
0
        private ConstructorInfo Select(IEnumerable <ConstructorInfo> constructors, ArgumentContainer arguments,
                                       params Type[] registeredTypes)
        {
            var selector = new LightCore.Activation.Components.ConstructorSelector();

            var resolutionContext =
                new ResolutionContext(
                    null,
                    RegistrationHelper.GetRegistrationContainerFor(registeredTypes),
                    arguments,
                    new ArgumentContainer());

            return(selector
                   .SelectConstructor(constructors, resolutionContext));
        }