Castle.MicroKernel.Handlers.DefaultGenericHandler.EnsureInterfaceMappingInitialized C# (CSharp) Method

EnsureInterfaceMappingInitialized() private static method

private static EnsureInterfaceMappingInitialized ( Type closedImplementationType, Type>.IDictionary &genericDefinitionToInterface ) : void
closedImplementationType System.Type
genericDefinitionToInterface Type>.IDictionary
return void
		private static void EnsureInterfaceMappingInitialized(Type closedImplementationType, ref IDictionary<Type, Type> genericDefinitionToInterface)
		{
			if (genericDefinitionToInterface == null)
			{
				genericDefinitionToInterface = closedImplementationType
					.GetInterfaces()
					.Where(i => i.IsGenericType)
					.ToDictionary(i => i.GetGenericTypeDefinition());
			}
		}
	}