Exemple #1
0
        public RequiredMethodDefinition(RequirementDefinitionBase declaringRequirement, MethodInfo interfaceMethod, MethodDefinition implementingMethod)
        {
            ArgumentUtility.CheckNotNull("declaringRequirement", declaringRequirement);
            ArgumentUtility.CheckNotNull("implementingMethod", implementingMethod);
            ArgumentUtility.CheckNotNull("interfaceMethod", interfaceMethod);

            _declaringRequirement = declaringRequirement;
            _interfaceMethod      = interfaceMethod;
            _implementingMethod   = implementingMethod;
        }
        private readonly DependencyDefinitionBase _aggregator;   // the outer dependency containing this dependency, if defined indirectly

        public DependencyDefinitionBase(RequirementDefinitionBase requirement, DependencyDefinitionBase aggregator)
        {
            ArgumentUtility.CheckNotNull("requirement", requirement);
            ArgumentUtility.CheckType("aggregator", aggregator, GetType());

            _requirement = requirement;
            _aggregator  = aggregator;

            _aggregatedDependencies = new UniqueDefinitionCollection <Type, DependencyDefinitionBase> (
                delegate(DependencyDefinitionBase d) { return(d.RequiredType.Type); },
                HasSameDepender);
        }