コード例 #1
0
 /// <summary>
 /// Lists all registered implementations of an interface
 /// </summary>
 internal static IEnumerable <KeyValuePair <string, string> > GetImplementationsOf <T>()
 {
     return(ConfigurationKernel.ResolveList(typeof(T)));
 }
コード例 #2
0
        /// <summary>
        /// Resolves a implementation binding by the root class or interface
        /// </summary>
        public static T ActivateGeneric <T>(string named)
        {
            var type = new ResolveContext <T>((IScopeContextInternal)ConfigurationKernel.Resolve(typeof(T).GetGenericTypeDefinition(), named));

            return(type.Activate());
        }