Table of Contents

Class SecurityContext

Namespace
log4net.Core
Assembly
log4net.dll

A SecurityContext used by log4net when interacting with protected resources

public abstract class SecurityContext
Inheritance
SecurityContext
Derived
Inherited Members

Remarks

A SecurityContext used by log4net when interacting with protected resources for example with operating system services. This can be used to impersonate a principal that has been granted privileges on the system resources.

Constructors

SecurityContext()

protected SecurityContext()

Methods

Impersonate(object)

Impersonate this SecurityContext

public abstract IDisposable Impersonate(object state)

Parameters

state object

State supplied by the caller

Returns

IDisposable

An IDisposable instance that will revoke the impersonation of this SecurityContext, or null

Remarks

Impersonate this security context. Further calls on the current thread should now be made in the security context provided by this object. When the IDisposable result Dispose() method is called the security context of the thread should be reverted to the state it was in before Impersonate(object) was called.