public void GuardAgainstReentry_ReturnsInstance() { #pragma warning disable 618 GuardAgainstReentry sentry = null; sentry = Guard.AgainstReEntry(sentry); #pragma warning restore 618 Assert.IsNotNull(sentry); }
private void WorkWithoutReentry(TestSession session) { #pragma warning disable 618 using (_sentry = Guard.AgainstReEntry(_sentry)) #pragma warning restore 618 { session.DoWork(); } }
private void WorkWithReentry(TestSession session, int count) { #pragma warning disable 618 using (_sentry = Guard.AgainstReEntry(_sentry)) #pragma warning restore 618 { session.DoWork(); if (count == 0) { WorkWithReentry(session, count + 1); } } }