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); }
public override void Load() { var scenarios = AssemblyTypeResolver .GetAllTypesFromAppDomain() .Where(type => type.IsScenario() && !type.IsAbstract); foreach (var scenario in scenarios) { Bind(scenario).ToSelf(); } }
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); }
/// <inheritdoc /> public IEnumerable <Type> GetAllTypesFromAppDomain() { return(AssemblyTypeResolver.GetAllTypesFromAppDomain()); }