public IEnumerable <KeyValuePair <TypeInfo, IIdentity> > Get(IEnumerable <TypeInfo> parameter) { foreach (var type in parameter.SelectMany(_types).Distinct()) { var key = _identity.Get(type); if (key != null) { var identifier = key.Value.Identifier.NullIfEmpty() ?? _formatter.Get(type); var name = key.Value.Name.NullIfEmpty() ?? type.Name; var identity = _store.Get(name, identifier); yield return(Pairs.Create(type, identity)); } } }
public string Get(TypeInfo parameter) => _known.Get(parameter.Assembly) ?.Identifier ?? _formatter.Get(parameter);