<commit_before>using cdmdotnet.Logging;
using cdmdotnet.Logging.Configuration;
using CQRSCode.ReadModel;
using CQRSCode.WriteModel;
using Cqrs.Bus;
using Cqrs.Cache;
using Cqrs.Commands;
using Cqrs.Domain;
using Cqrs.Domain.Factories;
using Cqrs.Events;
using Cqrs.Authentication;
using Cqrs.Configuration;
using Cqrs.DataStores;
using StructureMap;
using StructureMap.Graph;

namespace CQRSWeb {
	public static class IoC {
		public static IContainer Initialize() {
			ObjectFactory.Initialize(x =>
						{
							x.For<ICorrelationIdHelper>().Singleton().Use<NullCorrelationIdHelper>();
							x.For<ILogger>().Singleton().Use<ConsoleLogger>();
							x.For<ILoggerSettings>().Singleton().Use<LoggerSettingsConfigurationSection>();
							x.For<IAuthenticationTokenHelper<ISingleSignOnToken>>().Singleton().Use<SingleSignOnTokenValueHelper>();
							x.For<InProcessBus<ISingleSignOnToken>>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IAggregateFactory>().Singleton().Use<AggregateFactory>();
							x.For<ICommandSender<ISingleSignOnToken>>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IEventPublisher<ISingleSignOnToken>>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IHandlerRegistrar>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IUnitOfWork<ISingleSignOnToken>>().HybridHttpOrThreadLocalScoped().Use<UnitOfWork<ISingleSignOnToken>>();

							x.For<IConfigurationManager>().Singleton().Use<ConfigurationManager>();
							x.For<IEventBuilder<ISingleSignOnToken>>().Singleton().Use<DefaultEventBuilder<ISingleSignOnToken>>();
							x.For<IEventDeserialiser<ISingleSignOnToken>>().Singleton().Use<EventDeserialiser<ISingleSignOnToken>>();
							x.For<IEventStore<ISingleSignOnToken>>().Singleton().Use<SqlEventStore<ISingleSignOnToken>>();

							x.For<ICommandHandlerRegistrar>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IEventHandlerRegistrar>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IRepository<ISingleSignOnToken>>().HybridHttpOrThreadLocalScoped().Use(y =>
																					 new CacheRepository<ISingleSignOnToken>(
																						 new Repository<ISingleSignOnToken>(y.GetInstance<IAggregateFactory>(), y.GetInstance<IEventStore<ISingleSignOnToken>>(), y.GetInstance<IEventPublisher<ISingleSignOnToken>>(), y.GetInstance<ICorrelationIdHelper>()),
																						 y.GetInstance<IEventStore<ISingleSignOnToken>>()));

							// Scan the assembly the ReadModelFacade class is in and then configure using the pattern
							// IClass == Class
							x.Scan(s =>
							{
								s.TheCallingAssembly();
								s.AssemblyContainingType<ReadModelFacade>();
								s.Convention<FirstInterfaceConvention>();
							});
						});<commit_msg>another fix<commit_after>using cdmdotnet.Logging;
using cdmdotnet.Logging.Configuration;
using CQRSCode.ReadModel;
using CQRSCode.WriteModel;
using Cqrs.Bus;
using Cqrs.Cache;
using Cqrs.Commands;
using Cqrs.Domain;
using Cqrs.Domain.Factories;
using Cqrs.Events;
using Cqrs.Authentication;
using Cqrs.Configuration;
using Cqrs.DataStores;
using StructureMap;
using StructureMap.Graph;

namespace CQRSWeb {
	public static class IoC {
		public static IContainer Initialize() {
			ObjectFactory.Initialize(x =>
						{
							x.For<ICorrelationIdHelper>().Singleton().Use<NullCorrelationIdHelper>();
							x.For<ILogger>().Singleton().Use<ConsoleLogger>();
							x.For<ILoggerSettings>().Singleton().Use<LoggerSettingsConfigurationSection>();
							x.For<IAuthenticationTokenHelper<ISingleSignOnToken>>().Singleton().Use<AuthenticationTokenHelper>();
							x.For<InProcessBus<ISingleSignOnToken>>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IAggregateFactory>().Singleton().Use<AggregateFactory>();
							x.For<ICommandSender<ISingleSignOnToken>>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IEventPublisher<ISingleSignOnToken>>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IHandlerRegistrar>().Use(y => y.GetInstance<InProcessBus<ISingleSignOnToken>>());
							x.For<IUnitOfWork<ISingleSignOnToken>>().HybridHttpOrThreadLocalScoped().Use<UnitOfWork<ISingleSignOnToken>>();

							x.For<IConfigurationManager>().Singleton().Use<ConfigurationManager>();
							x.For<IEventBuilder<ISingleSignOnToken>>().Singleton().Use<DefaultEventBuilder<ISingleSignOnToken>>();
							x.For<IEventDeserialiser<ISingleSignOnToken>>().Singleton().Use<EventDeserialiser<ISingleSignOnToken>>();
							x.For<IEventStore<ISingleSignOnToken>>().Singleton().Use<SqlEventStore<ISingleSignOnToken>>();

							x.For<ICommandHandlerRegistrar>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IEventHandlerRegistrar>().Singleton().Use<InProcessBus<ISingleSignOnToken>>();
							x.For<IRepository<ISingleSignOnToken>>().HybridHttpOrThreadLocalScoped().Use(y =>
																					 new CacheRepository<ISingleSignOnToken>(
																						 new Repository<ISingleSignOnToken>(y.GetInstance<IAggregateFactory>(), y.GetInstance<IEventStore<ISingleSignOnToken>>(), y.GetInstance<IEventPublisher<ISingleSignOnToken>>(), y.GetInstance<ICorrelationIdHelper>()),
																						 y.GetInstance<IEventStore<ISingleSignOnToken>>()));

							// Scan the assembly the ReadModelFacade class is in and then configure using the pattern
							// IClass == Class
							x.Scan(s =>
							{
								s.TheCallingAssembly();
								s.AssemblyContainingType<ReadModelFacade>();
								s.Convention<FirstInterfaceConvention>();
							});
						});
{'fraction_non_alphanumeric': 0.14202437731849496, 'fraction_numerical': 0.0, 'mean_word_length': 5.23568281938326, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4400397', 'n_tokens_mistral': 2068, 'n_tokens_neox': 1730, 'n_words': 179}