ServiceControllerPermission 构造函数

定义

初始化 ServiceControllerPermission 类的新实例。

重载

ServiceControllerPermission()

初始化 ServiceControllerPermission 类的新实例。

ServiceControllerPermission(PermissionState)

用指定的对资源的访问权限初始化 ServiceControllerPermission 类的新实例。

ServiceControllerPermission(ServiceControllerPermissionEntry[])

用指定的权限项初始化 ServiceControllerPermission 类的新实例。

ServiceControllerPermission(ServiceControllerPermissionAccess, String, String)

用指定的权限访问级别、服务所驻留的计算机的名称和向系统标识该服务的简称初始化 ServiceControllerPermission 类的新实例。

ServiceControllerPermission()

初始化 ServiceControllerPermission 类的新实例。

public:
 ServiceControllerPermission();
public ServiceControllerPermission ();
Public Sub New ()

适用于

ServiceControllerPermission(PermissionState)

用指定的对资源的访问权限初始化 ServiceControllerPermission 类的新实例。

public:
 ServiceControllerPermission(System::Security::Permissions::PermissionState state);
public ServiceControllerPermission (System.Security.Permissions.PermissionState state);
new System.ServiceProcess.ServiceControllerPermission : System.Security.Permissions.PermissionState -> System.ServiceProcess.ServiceControllerPermission
Public Sub New (state As PermissionState)

参数

state
PermissionState

PermissionState 值之一。

例外

state 参数不是 PermissionState 的有效值。

另请参阅

适用于

ServiceControllerPermission(ServiceControllerPermissionEntry[])

用指定的权限项初始化 ServiceControllerPermission 类的新实例。

public:
 ServiceControllerPermission(cli::array <System::ServiceProcess::ServiceControllerPermissionEntry ^> ^ permissionAccessEntries);
public ServiceControllerPermission (System.ServiceProcess.ServiceControllerPermissionEntry[] permissionAccessEntries);
new System.ServiceProcess.ServiceControllerPermission : System.ServiceProcess.ServiceControllerPermissionEntry[] -> System.ServiceProcess.ServiceControllerPermission
Public Sub New (permissionAccessEntries As ServiceControllerPermissionEntry())

参数

permissionAccessEntries
ServiceControllerPermissionEntry[]

一个 ServiceControllerPermissionEntry 对象数组。 PermissionEntries 属性被设置为该值。

例外

permissionAccessEntriesnull

适用于

ServiceControllerPermission(ServiceControllerPermissionAccess, String, String)

用指定的权限访问级别、服务所驻留的计算机的名称和向系统标识该服务的简称初始化 ServiceControllerPermission 类的新实例。

public:
 ServiceControllerPermission(System::ServiceProcess::ServiceControllerPermissionAccess permissionAccess, System::String ^ machineName, System::String ^ serviceName);
public ServiceControllerPermission (System.ServiceProcess.ServiceControllerPermissionAccess permissionAccess, string machineName, string serviceName);
new System.ServiceProcess.ServiceControllerPermission : System.ServiceProcess.ServiceControllerPermissionAccess * string * string -> System.ServiceProcess.ServiceControllerPermission
Public Sub New (permissionAccess As ServiceControllerPermissionAccess, machineName As String, serviceName As String)

参数

machineName
String

服务所驻留的计算机的名称。

serviceName
String

向系统标识该服务的简称。

适用于