Beispiel #1
0
 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());
     }
 }
Beispiel #2
0
        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);
Beispiel #3
0
 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);
     }
 }
Beispiel #4
0
        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);