SecurityContext Impersonate Method | Apache log4net™ SDK Documentation

Impersonate this SecurityContext

Namespace: log4net.Core
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public abstract IDisposable Impersonate(
    	Object state
    )

    Public MustOverride Function Impersonate (
    	state As Object
    ) As IDisposable

    public:
    virtual IDisposable^ Impersonate(
    	Object^ state
    ) abstract

    abstract Impersonate :
            state : Object -> IDisposable

#### Parameters

state
  Type: System
  Object
  State supplied by the caller

#### Return Value

Type: 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.

See Also

#### Reference

SecurityContext Class
log4net.Core Namespace