public static SymbolKeyResolution Resolve( string symbolKey, Compilation compilation, bool ignoreAssemblyKey = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var reader = SymbolKeyReader.GetReader(symbolKey, compilation, ignoreAssemblyKey, cancellationToken)) { return(reader.ReadFirstSymbolKey()); } }
internal static SymbolKeyResolution ResolveString( string symbolKey, Compilation compilation, bool ignoreAssemblyKey = false, CancellationToken cancellationToken = default) { using var reader = SymbolKeyReader.GetReader( symbolKey, compilation, ignoreAssemblyKey, cancellationToken); var version = reader.ReadFormatVersion(); if (version != FormatVersion) { return(default);
public static SymbolKeyResolution Resolve( string symbolKey, Compilation compilation, bool ignoreAssemblyKey = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var reader = SymbolKeyReader.GetReader(symbolKey, compilation, ignoreAssemblyKey, cancellationToken)) { var result = reader.ReadFirstSymbolKey(); Debug.Assert(reader.Position == symbolKey.Length); return(result); } }
public static SymbolKeyResolution ResolveString( string symbolKey, Compilation compilation, bool ignoreAssemblyKey, out string failureReason, CancellationToken cancellationToken) { using var reader = SymbolKeyReader.GetReader( symbolKey, compilation, ignoreAssemblyKey, cancellationToken); var version = reader.ReadFormatVersion(); if (version != FormatVersion) { failureReason = $"({nameof(SymbolKey)} invalid format '${version}')"; return(default);