Update() private method

private Update ( IComponentRegistry componentRegistry ) : void
componentRegistry IComponentRegistry
return void
コード例 #1
0
ファイル: Module.cs プロジェクト: dstimac/revenj
		/// <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);
		}
コード例 #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;
			}
		}