コード例 #1
0
ファイル: StuntFactory.cs プロジェクト: wmadzha/moq
        /// <summary>
        /// See <see cref="IStuntFactory.CreateStunt(Assembly, Type, IEnumerable{Type}, object[])"/>
        /// </summary>
        public object CreateStunt(Assembly stuntsAssembly, Type baseType, Type[] implementedInterfaces, object[] construtorArguments)
        {
            var name = StuntNaming.GetFullName(baseType, implementedInterfaces);
            var type = stuntsAssembly.GetType(name, true, false);

            return(Activator.CreateInstance(type, construtorArguments));
        }