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