public ServiceDefinition ResolveDefinition(ServiceDescriptor serviceDescriptor) { Type forType = ResolveType(serviceDescriptor.GetForTypeIdentifier(ServiceRegistryRepository)); Type useType = ResolveType(serviceDescriptor.GetUseTypeIdentifier(ServiceRegistryRepository)); Args.ThrowIfNull(forType, "forType"); Args.ThrowIfNull(useType, "useType"); return(new ServiceDefinition { ForAssembly = forType.Assembly, UseAssembly = useType.Assembly, ForType = forType, UseType = useType }); }