private static void ProcessType(IContainerConfiguration container, TypeInfo concreteType, Type serviceType) { var typeDefinition = serviceType.GetGenericTypeDefinition(); if (HandlerTypeDefinitions.Any(h => h == typeDefinition)) { var serviceScope = concreteType.GetServiceScope() ?? ServiceScope.Default; container. Register(serviceType). InScope(serviceScope). UsingConcreteType(concreteType.AsType()); } }
private static void ProcessServiceType(IContainerConfiguration container, TypeInfo concreteType, Type serviceType) { if (serviceType.IsConstructedGenericType) { var typeDefinition = serviceType.GetGenericTypeDefinition(); if (typeDefinition == SettingsHandlerTypeDefinition) { var serviceScope = concreteType.GetServiceScope() ?? ServiceScope.Default; container. Register(serviceType). InScope(serviceScope). UsingConcreteType(concreteType.AsType()); } } }