public static void TestMethod() { var disposable = new DisposableDooHickey(); Console.WriteLine(disposable.IsValid); using var shouldBeHereToo = MethodsWithAndWithoutUsingMandatoryAttribute.CreateDisposableRefStruct(); Console.WriteLine(shouldBeHereToo.IsValid && !shouldBeHereToo.IsDisposed); }
public static void NoDiagnosticDeclaredInline() { //RefStructsRoxor disposeMe; using (var disposeMe = MethodsWithAndWithoutUsingMandatoryAttribute.CreateDisposableRefStruct()) { Console.WriteLine(disposeMe.IsValid); } Console.WriteLine(disposeMe.IsValid); }
public static void NoDiagnosticDecl() { using var disposeMe = MethodsWithAndWithoutUsingMandatoryAttribute.CreateDisposableRefStruct(); Console.WriteLine(disposeMe.IsValid); }