Пример #1
0
 private ResolvableService CreateResolvableService(ITypeSymbol serviceType, DependencyGraph dependencyGraph)
 => new ResolvableService(serviceType.FullyQualifiedTypeName(), ProduceNode(dependencyGraph.Resolve(serviceType), dependencyGraph));
Пример #2
0
 private ServiceConstructor CreateServiceConstructorWithName(string constructorName, ITypeSymbol serviceType, DependencyGraph dependencyGraph)
 => new ServiceConstructor(serviceType.FullyQualifiedTypeName(), constructorName, ProduceNode(dependencyGraph.Resolve(serviceType), dependencyGraph));
Пример #3
0
 public Registration Resolve(ITypeSymbol typeSymbol)
 => _registrationDictionary.TryGetValue(typeSymbol, out var value) ? value : throw new Exception($"Failed to find dependency: {typeSymbol.FullyQualifiedTypeName()}");