mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
C#: Extract alignment and format clauses of string interpolation expressions.
This commit is contained in:
@@ -29,6 +29,15 @@ namespace Semmle.Extraction.CSharp
|
||||
symbol is null ? (AnnotatedTypeSymbol?)null : new AnnotatedTypeSymbol(symbol, NullableAnnotation.None);
|
||||
}
|
||||
|
||||
internal static class AnnotatedTypeSymbolExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if the type is a string type.
|
||||
/// </summary>
|
||||
public static bool IsStringType(this AnnotatedTypeSymbol? type) =>
|
||||
type.HasValue && type.Value.Symbol?.SpecialType == SpecialType.System_String;
|
||||
}
|
||||
|
||||
internal static class SymbolExtensions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user