Exemplo n.º 1
0
        /// <summary>
        /// Gets the instances from the executing assembly.
        /// </summary>
        /// <typeparam name="T">Generic - any interface.</typeparam>
        /// <returns>List of Ts.</returns>
        public static IList <T> GetInstancesFromExecutingAssembly <T>()
        {
            IList <object> registeredInstances = AssemblyResolver.Resolve();

            return(Register <T>(registeredInstances));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the instances from any given assembly file.
        /// </summary>
        /// <typeparam name="T">Generic - any interface.</typeparam>
        /// <param name="assemblyName">Assembly file.</param>
        /// <returns>List of Ts.</returns>
        public static IList <T> GetInstancesFromAssembly <T>(string assemblyName)
        {
            IList <object> registeredInstances = AssemblyResolver.Resolve(assemblyName);

            return(Register <T>(registeredInstances));
        }