Assembly: log4net (in log4net.dll) Version: 18.104.22.168-.NET 4.0
public class SecurityContextProvider
Public Class SecurityContextProvider
public ref class SecurityContextProvider
type SecurityContextProvider = class end
Thetype exposes the following members.
Protected default constructor to allow subclassing
Gets or sets the default SecurityContextProvider
Create a SecurityContext for a consumer
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.(Inherited from Object.)
Serves as a hash function for a particular type.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Creates a shallow copy of the current Object.(Inherited from Object.)
A configured component that interacts with potentially protected system resources uses a SecurityContext to provide the elevated privileges required. If the SecurityContext object has been not been explicitly provided to the component then the component will request one from this .
This default behavior can be overridden by subclassing the CreateSecurityContext(Object) method to return the desired SecurityContext objects. The default provider can be replaced by programmatically setting the value of the DefaultProvider property.and overriding the
An alternative is to use the log4net.Config.SecurityContextProviderAttribute This attribute can be applied to an assembly in the same way as the log4net.Config.XmlConfiguratorAttribute". The attribute takes the type to use as the as an argument.