Exemple #1
0
        /// <summary>
        /// Generic parameters has to be satisfiable by Instance.
        /// </summary>
        /// <param name="genericType">Type which generic arguments will be substituted by WrappedInstance.</param>
        /// <returns>TestingAssembly.</returns>
        public TestingAssembly AddWrappedGenericToRuntime(Type genericType)
        {
            beforeRuntimeAction(() =>
            {
                SettingsProvider.AddDirectType(Runtime, genericType);
            });

            return(this);
        }
Exemple #2
0
        /// <summary>
        /// Adds the type as <see cref="DirectTypeDefinition"/> to runtime.
        /// </summary>
        /// <typeparam name="T">Type that will be added</typeparam>
        /// <returns>TestingAssembly.</returns>
        public TestingAssembly AddDirectToRuntime <T>()
        {
            beforeRuntimeAction(() =>
            {
                SettingsProvider.AddDirectType(Runtime, typeof(T));
            });

            return(this);
        }