Update() private method

private Update ( IComponentRegistry componentRegistry ) : void
componentRegistry IComponentRegistry
return void
Esempio n. 1
0
		/// <summary>
		/// Apply the module to the component registry.
		/// </summary>
		/// <param name="componentRegistry">Component registry to apply configuration to.</param>
		public void Configure(IComponentRegistry componentRegistry)
		{
			if (componentRegistry == null) throw new ArgumentNullException("componentRegistry");
			var moduleBuilder = new ContainerBuilder();
			Load(moduleBuilder);
			moduleBuilder.Update(componentRegistry);
			AttachToRegistrations(componentRegistry);
			AttachToSources(componentRegistry);
		}
Esempio n. 2
0
		private void BuildScopeIfRequired()
		{
			if (!ShouldBuildScope)
				return;
			lock (sync)
			{
				if (!ShouldBuildScope)
					return;
				RegistrationCache.Clear();
				var cb = new ContainerBuilder();
				RegisterNew(cb);
				cb.Update(CurrentScope.ComponentRegistry);

				FactoryBuilders.Clear();
				AutofacBuilders.Clear();
				SimpleCache.Clear();
				ServiceCache.Clear();
				CacheWithArguments.Clear();
				ShouldBuildScope = false;
			}
		}