Exemplo n.º 1
0
 internal static bool IsDisposableRefStruct(this ITypeSymbol symbol, LanguageVersion languageVersion) =>
 languageVersion.IsAtLeast(LanguageVersionEx.CSharp8) &&
 IsRefStruct(symbol) &&
 symbol.GetMembers("Dispose").Any(s => s is IMethodSymbol method && method.IsDisposeMethod());