private void RegisterScenarios(TinyIoCContainer container)
        {
            var scenarios = AssemblyTypeResolver
                            .GetAllTypesFromAppDomain()
                            .Where(type => type.IsScenario() && !type.IsAbstract)
                            .ToList();

            container.RegisterMultiple <IScenario>(scenarios);
            this.Log().DebugFormat("Registered {RegisteredScenarioCount} Scenarios", scenarios.Count);
        }
Example #2
0
        public override void Load()
        {
            var scenarios = AssemblyTypeResolver
                            .GetAllTypesFromAppDomain()
                            .Where(type => type.IsScenario() && !type.IsAbstract);

            foreach (var scenario in scenarios)
            {
                Bind(scenario).ToSelf();
            }
        }
Example #3
0
        static SpecifyConfiguration Configure()
        {
            var customConvention = AssemblyTypeResolver
                                   .GetAllTypesFromAppDomain()
                                   .FirstOrDefault(type => typeof(SpecifyConfiguration).IsAssignableFrom(type) && type.IsClass);
            var config = customConvention != null
                ? (SpecifyConfiguration)Activator.CreateInstance(customConvention)
                : new SpecifyConfiguration();

            Configurator.Scanners.StoryMetadataScanner = () => new SpecifyStoryMetadataScanner();
            if (config.LoggingEnabled)
            {
                Configurator.Processors.Add(() => new LoggingProcessor());
            }

            return(config);
        }
Example #4
0
 /// <inheritdoc />
 public IEnumerable <Type> GetAllTypesFromAppDomain()
 {
     return(AssemblyTypeResolver.GetAllTypesFromAppDomain());
 }