Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        /// <param name="configAction"></param>
        /// <returns></returns>
        public static IConventionalRegistrationContext Action(this IConventionalRegistrationContext context, Action <IConventionalConfiguration> configAction)
        {
            var config = new ConventionalConfiguration(context.Services);

            configAction(config);
            return(context);
        }
Example #2
0
        public void GetContext()
        {
            var services = new ServiceCollection();
            var config   = new ConventionalConfiguration <ConventionalDependencyAction>(services, new Type[] { });

            config.GetContext().ShouldBeOfType <ConventionalContext <ConventionalDependencyAction> >().ShouldNotBeNull();
        }
Example #3
0
        private static IConventionalContext <ConventionalDependencyAction> GetContext()
        {
            var services = new ServiceCollection();
            var config   = new ConventionalConfiguration <ConventionalDependencyAction>(services, new Type[] { });
            var context  = config.GetContext().As <IConventionalContext <ConventionalDependencyAction> >();

            return(context);
        }