diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs index 79d18d769245e16d38e40de61d33f87f0b3808ff..b604c2b96ab8e5ebf0d9e4a3dc7b3b4341fb8058 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs @@ -37,7 +37,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var location = reader.ReadLocation(out var locationFailureReason); if (locationFailureReason != null) { - failureReason = $"({nameof(AnonymousFunctionOrDelegateSymbolKey)} {nameof(location)} failed -> ${locationFailureReason})"; + failureReason = $"({nameof(AnonymousFunctionOrDelegateSymbolKey)} {nameof(location)} failed -> {locationFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs index 90934603760bdcd878524f1578653787e09a6557..5dc2c8c987a9981231b2a378c3bd905a04876baf 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs @@ -33,7 +33,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var propertyTypes = reader.ReadSymbolKeyArray(out var propertyTypesFailureReason); if (propertyTypesFailureReason != null) { - failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyTypes)} failed -> ${propertyTypesFailureReason})"; + failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyTypes)} failed -> {propertyTypesFailureReason})"; return default; } @@ -42,7 +42,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var propertyLocations = reader.ReadLocationArray(out var propertyLocationsFailureReason); if (propertyLocationsFailureReason != null) { - failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyLocations)} failed -> ${propertyLocationsFailureReason})"; + failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyLocations)} failed -> {propertyLocationsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs index 407a04e8755ec31a9391003b9f4537aa02595314..a0b00707fcb325fc42b2686f88cfeb6a660f29a3 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs @@ -125,7 +125,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string? fa var locations = reader.ReadLocationArray(out var locationsFailureReason); if (locationsFailureReason != null) { - failureReason = $"({nameof(BodyLevelSymbolKey)} {nameof(locations)} failed -> ${locationsFailureReason})"; + failureReason = $"({nameof(BodyLevelSymbolKey)} {nameof(locations)} failed -> {locationsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs index a02d0c90f1b64e5aecb0180e6358c0b18b19db37..1c0e3bfd027d1a5d006d5b8d9770e109b8fb4d03 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs @@ -64,7 +64,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = ResolveContainer(reader, out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } @@ -73,7 +73,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs index e437be63e6d9866c5f0ffa9f38687334ba79eefc..f2a018d5d40742acc757945c17f28eba1d830f4a 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs @@ -20,7 +20,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingTypeResolution = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(EventSymbolKey)} {nameof(containingTypeResolution)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(EventSymbolKey)} {nameof(containingTypeResolution)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs index 18a576f6220ddff88829ca2274bc4da09c2b6fde..71e024c6856312fc2c27096a405955b69d30c293 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs @@ -20,7 +20,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingTypeResolution = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(FieldSymbolKey)} {nameof(containingTypeResolution)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(FieldSymbolKey)} {nameof(containingTypeResolution)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs index 61d8c185081be147e2187787d318367ee0e3b4bf..8563aec016a079bd2964754dc9417a7f37eb715e 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs @@ -23,14 +23,14 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var reducedFromResolution = reader.ReadSymbolKey(out var reducedFromFailureReason); if (reducedFromFailureReason != null) { - failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(reducedFromResolution)} failed -> ${reducedFromFailureReason})"; + failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(reducedFromResolution)} failed -> {reducedFromFailureReason})"; return default; } var receiverTypeResolution = reader.ReadSymbolKey(out var receiverTypeFailureReason); if (receiverTypeFailureReason != null) { - failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(receiverTypeResolution)} failed -> ${receiverTypeFailureReason})"; + failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(receiverTypeResolution)} failed -> {receiverTypeFailureReason})"; return default; } @@ -63,14 +63,14 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var constructedFrom = reader.ReadSymbolKey(out var constructedFromFailureReason); if (constructedFromFailureReason != null) { - failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(constructedFrom)} failed -> ${constructedFromFailureReason})"; + failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(constructedFrom)} failed -> {constructedFromFailureReason})"; return default; } using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (typeArgumentsFailureReason != null) { - failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } @@ -139,7 +139,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingType = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(MethodSymbolKey)} {nameof(containingType)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(MethodSymbolKey)} {nameof(containingType)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs index 25498f06767c4feb29e718f40e43a5a2d321eb4d..9536b7a46355d6489a1858e543ee693e6dc6b42c 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs @@ -16,7 +16,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ModuleSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ModuleSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs index c2d18e90b3e3f4fe630686d66d709b9edfbc8cab..8d6b929fcc24569cdb7898979bef8a6040fb10f4 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs @@ -35,7 +35,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(containingSymbolFailureReason)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(containingSymbolFailureReason)} failed -> {containingSymbolFailureReason})"; return default; } @@ -44,7 +44,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (typeArgumentsFailureReason != null) { - failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs index f273b6850b61c188ab953757237382e676a03ae6..f3f3b8a0f4d7ecd3e4c47417852a9f53abacbd31 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs @@ -60,7 +60,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(EventSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(EventSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs index 6ce4777e63fe24927dc4c81061e2a3834e49d20e..6a59071f1321ce177dff2d6dceb53e2323f818a4 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs @@ -22,7 +22,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs index f7141724828a927b4f6991d10f21019b86d88c24..565108932530d54daae62508b4c593ccb353b85b 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs @@ -16,7 +16,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var pointedAtTypeResolution = reader.ReadSymbolKey(out var pointedAtTypeFailureReason); if (pointedAtTypeFailureReason != null) { - failureReason = $"({nameof(PointerTypeSymbolKey)} {nameof(pointedAtTypeResolution)} failed -> ${pointedAtTypeFailureReason})"; + failureReason = $"({nameof(PointerTypeSymbolKey)} {nameof(pointedAtTypeResolution)} failed -> {pointedAtTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs index 259e5b3038d71de8505bd70de4a93e41abd18f68..b27a2ffec204ebe4cce0999fb18b62a3f91602c5 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs @@ -549,7 +549,7 @@ public Location ReadLocation(out string failureReason) var syntaxTree = GetSyntaxTree(filePath); if (syntaxTree != null) { - failureReason = $"{nameof(ReadLocation)} {nameof(SyntaxTree)} not found"; + failureReason = null; return Location.Create(syntaxTree, new TextSpan(start, length)); } } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs index a95426fb4cc7217025a89fb774cba85fce71914b..1093b5d7353543e0c80a029543e9714235a7aa9a 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs @@ -55,7 +55,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var elementLocations = ReadElementLocations(reader, out var elementLocationsFailureReason); if (elementLocationsFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementLocations)} failed -> ${elementLocationsFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementLocations)} failed -> {elementLocationsFailureReason})"; return default; } @@ -65,7 +65,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var elementTypes = reader.ReadSymbolKeyArray(out var elementTypesFailureReason); if (elementTypesFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementTypes)} failed -> ${elementTypesFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementTypes)} failed -> {elementTypesFailureReason})"; return default; } @@ -88,7 +88,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var underlyingTypeResolution = reader.ReadSymbolKey(out var underlyingTypeFailureReason); if (underlyingTypeFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(underlyingTypeResolution)} failed -> ${underlyingTypeFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(underlyingTypeResolution)} failed -> {underlyingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs index f8b0a3b19ab5f4dbf7d463c3e936a206f5907c42..67217f77a2fb1a68d6d16fe25250a993b29e26fd 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs @@ -34,7 +34,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var location = reader.ReadLocation(out var locationFailureReason); if (locationFailureReason != null) { - failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(location)} failed -> ${locationFailureReason})"; + failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(location)} failed -> {locationFailureReason})"; return default; } @@ -49,7 +49,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; }