System.Configuration.BaseConfigurationRecord.Impersonate C# (CSharp) Method

Impersonate() protected method

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

            if (context == null) {
                context = EmptyImpersonationContext.GetStaticInstance();
            }

            return context;
        }
BaseConfigurationRecord