/// <summary>
 /// Add dependency resolvers to the policy set.
 /// </summary>
 /// <param name="policies">PolicyList to add the resolvers to.</param>
 /// <param name="parameterValues">Objects supplying the dependency resolvers.</param>
 /// <param name="result">Result object to store the keys in.</param>
 public static void AddParameterResolvers(IPolicyList policies, 
     IEnumerable<InjectionParameterValue> parameterValues, 
     SelectedMemberWithParameters result)
 {
     foreach(InjectionParameterValue parameterValue in parameterValues)
     {
         string key = Guid.NewGuid().ToString();
         policies.Set<IDependencyResolverPolicy>(parameterValue.GetResolverPolicy(), key);
         result.AddParameterKey(key);
     }
 }
        /// <summary>
        /// Add dependency resolvers to the parameter set.
        /// </summary>
        /// <param name="typeToBuild">Type that's currently being built (used to resolve open generics).</param>
        /// <param name="policies">PolicyList to add the resolvers to.</param>
        /// <param name="parameterValues">Objects supplying the dependency resolvers.</param>
        /// <param name="result">Result object to store the keys in.</param>
        public static void AddParameterResolvers(Type typeToBuild,
            IPolicyList policies,
            IEnumerable<InjectionParameterValue> parameterValues,
            SelectedMemberWithParameters result)
        {
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(policies, "policies");
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(parameterValues, "parameterValues");
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(result, "result");

            foreach (InjectionParameterValue parameterValue in parameterValues)
            {
                var resolver = parameterValue.GetResolverPolicy(typeToBuild);
                result.AddParameterResolver(resolver);
            }
        }
        /// <summary>
        /// Add dependency resolvers to the parameter set.
        /// </summary>
        /// <param name="typeToBuild">Type that's currently being built (used to resolve open generics).</param>
        /// <param name="policies">PolicyList to add the resolvers to.</param>
        /// <param name="parameterValues">Objects supplying the dependency resolvers.</param>
        /// <param name="result">Result object to store the keys in.</param>
        public static void AddParameterResolvers(Type typeToBuild,
            IPolicyList policies,
            IEnumerable<InjectionParameterValue> parameterValues,
            SelectedMemberWithParameters result)
        {
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(policies, "policies");
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(parameterValues, "parameterValues");
            Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(result, "result");

            foreach(InjectionParameterValue parameterValue in parameterValues)
            {
                string key = Guid.NewGuid().ToString();
                policies.Set<IDependencyResolverPolicy>(parameterValue.GetResolverPolicy(typeToBuild), key);
                result.AddParameterKey(key);
            }
        }