static KeyData GetGraphKeyImpl(ISymbol symbol, bool allowTypeParameter = false) { if (allowTypeParameter && symbol is ITypeParameterSymbol) { return(KeyData.FromKey(GetSymbolName(symbol))); } var segments = GetGraphKeyImpl(symbol, ImmutableList.Create <Segment>()); return(segments.Aggregate(KeyData.Empty, KeyData.Append)); }