We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test] public void Dump() { var methods = AppDomain.CurrentDomain .GetAssemblies() .SelectMany(a => a.GetTypes() .SelectMany(t => t.GetMethods().Where(m => !m.IsSpecialName && typeof(IDisposable).IsAssignableFrom(m.ReturnType) && !typeof(Task).IsAssignableFrom(m.ReturnType)))) .Select(x => $"{x.ReflectedType.FullName}.{x.Name}") .Distinct(); foreach (var method in methods) { Console.WriteLine(method); } }
The text was updated successfully, but these errors were encountered:
Special case System.IO.FileInfo.
f0d779a
#146
Special case Microsoft.Win32.RegistryKey
2b0949a
[TestCase(typeof(int))] public void DumpDisposables(Type type) { var methods = type.Assembly .GetTypes() .SelectMany(t => t.GetMethods().Where(m => !m.IsSpecialName && typeof(IDisposable).IsAssignableFrom(m.ReturnType) && !typeof(Task).IsAssignableFrom(m.ReturnType) && !typeof(IEnumerator).IsAssignableFrom(m.ReturnType))) .Select(x => $"{x.ReflectedType.FullName}.{x.Name}") .Distinct(); foreach (var method in methods) { Console.WriteLine(method); } }
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: