public static IUnityContainer ConfigureUnity(ISettingsContainer settingsContainer, ITracer tracer, ITracerContextManager tracerContextManager) { IUnityContainer container = new UnityContainer(); var massProcessors = new IMassProcessor[] { new TaskServiceJobsMassProcessor(container), }; var storageSettings = settingsContainer.AsSettings<ISqlStoreSettingsAspect>(); container.RegisterContexts() .AttachQueryableContainerExtension() .UseParameterResolvers(ParameterResolvers.Defaults) .ConfigureMetadata() .ConfigureSettingsAspects(settingsContainer) .ConfigureTracing(tracer, tracerContextManager) .ConfigureSecurityAspects() .ConfigureQuartz() .ConfigureIdentityInfrastructure() .ConfigureWcf() .ConfigureOperationsProcessing() .ConfigureStorage(storageSettings, EntryPointSpecificLifetimeManagerFactory) .ConfigureReplication(EntryPointSpecificLifetimeManagerFactory); ReplicationRoot.Instance.PerformTypesMassProcessing(massProcessors, true, typeof(object)); return container; }