protected IDisposable Impersonate() { IDisposable context = null; if (ClassFlags[ClassSupportsImpersonation]) { context = Host.Impersonate(); } if (context == null) { context = EmptyImpersonationContext.GetStaticInstance(); } return context; }