Click or drag to resize

PrivilegeEnabler Class

Used to enable one or more privileges. The privileges specified will be enabled during the lifetime of the instance. Users create an instance of this object in a using statement to ensure that it is properly disposed when the elevated privileges are no longer needed.
Inheritance Hierarchy
SystemObject
  Alphaleonis.Win32.SecurityPrivilegeEnabler

Namespace:  Alphaleonis.Win32.Security
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public sealed class PrivilegeEnabler : IDisposable

The PrivilegeEnabler type exposes the following members.

Constructors
  NameDescription
Public methodPrivilegeEnabler
Initializes a new instance of the PrivilegeEnabler class. This will enable the privileges specified (unless already enabled), and ensure that they are disabled again when the object is disposed. (Any privileges already enabled will not be disabled).
Top
Properties
  NameDescription
Public propertyEnabledPrivileges
Gets the enabled privileges. Note that this might not contain all privileges specified to the constructor. Only the privileges actually enabled by this instance is returned.
Top
Methods
  NameDescription
Public methodDispose
Makes sure any privileges enabled by this instance are disabled.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also