You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copy from https://github.com/dotnet/roslyn/blob/d2ff1d83e8fde6165531ad83f0e5b1ae95908289/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/CompilationExtensions.cs#L11-L68
9
+
/// <summary>
10
+
/// Gets a type by its metadata name to use for code analysis within a <see cref="Compilation"/>. This method
11
+
/// attempts to find the "best" symbol to use for code analysis, which is the symbol matching the first of the
12
+
/// following rules.
13
+
///
14
+
/// <list type="number">
15
+
/// <item><description>
16
+
/// If only one type with the given name is found within the compilation and its referenced assemblies, that
17
+
/// type is returned regardless of accessibility.
18
+
/// </description></item>
19
+
/// <item><description>
20
+
/// If the current <paramref name="compilation"/> defines the symbol, that symbol is returned.
21
+
/// </description></item>
22
+
/// <item><description>
23
+
/// If exactly one referenced assembly defines the symbol in a manner that makes it visible to the current
24
+
/// <paramref name="compilation"/>, that symbol is returned.
25
+
/// </description></item>
26
+
/// <item><description>
27
+
/// Otherwise, this method returns <see langword="null"/>.
28
+
/// </description></item>
29
+
/// </list>
30
+
/// </summary>
31
+
/// <param name="compilation">The <see cref="Compilation"/> to consider for analysis.</param>
32
+
/// <param name="fullyQualifiedMetadataName">The fully-qualified metadata type name to find.</param>
33
+
/// <returns>The symbol to use for code analysis; otherwise, <see langword="null"/>.</returns>
// Multiple visible types with the same metadata name are present
59
+
returnnull;
60
+
}
61
+
62
+
type=currentType;
63
+
}
64
+
65
+
returntype;
66
+
}
67
+
68
+
// Copy from https://github.com/dotnet/roslyn/blob/d2ff1d83e8fde6165531ad83f0e5b1ae95908289/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ISymbolExtensions.cs#L28-L73
0 commit comments