public static SymbolKeyResolution Resolve(SymbolKeyReader reader) { var methodIndex = reader.ReadInteger(); var ordinal = reader.ReadInteger(); var typeParameter = reader.ResolveMethod(methodIndex).TypeParameters[ordinal]; return(new SymbolKeyResolution(typeParameter)); }
public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string failureReason) { var methodIndex = reader.ReadInteger(); var ordinal = reader.ReadInteger(); var method = reader.ResolveMethod(methodIndex); var typeParameter = method?.TypeParameters[ordinal]; if (typeParameter == null) { failureReason = $"({nameof(TypeParameterOrdinalSymbolKey)} failed)"; return(default);