AccessChecksLevelOption 枚举

定义

为应用程序指定访问检查级别,检查可以只在进程级别,也可以在包括组件、接口和方法级别的所有级别。Specifies the level of access checking for an application, either at the process level only or at all levels, including component, interface, and method levels.

public enum class AccessChecksLevelOption
[System.Serializable]
public enum AccessChecksLevelOption
type AccessChecksLevelOption = 
Public Enum AccessChecksLevelOption
继承
AccessChecksLevelOption
属性

字段

Application 0

仅在进程级别启用访问检查。Enables access checks only at the process level. 在组件、接口或方法级别不进行访问检查。No access checks are made at the component, interface, or method level.

ApplicationComponent 1

在应用程序调用的每一个级别启用访问检查。Enables access checks at every level on calls into the application.

示例

下面的代码示例演示如何将此枚举与ApplicationAccessControlAttribute属性一起使用。The following code example demonstrates the use of this enumeration in conjunction with the ApplicationAccessControlAttribute attribute.

// Set component access controls.
[assembly:ApplicationAccessControl(Authentication=AuthenticationOption::Privacy,
ImpersonationLevel=ImpersonationLevelOption::Identify,
AccessChecksLevel=AccessChecksLevelOption::ApplicationComponent)];
// Set component access controls.
[assembly: ApplicationAccessControl(Authentication=AuthenticationOption.Privacy,
                                    ImpersonationLevel=ImpersonationLevelOption.Identify,
                                    AccessChecksLevel=AccessChecksLevelOption.ApplicationComponent)]
' Set component access controls.
<Assembly: ApplicationAccessControl(Authentication:=AuthenticationOption.Privacy, ImpersonationLevel:=ImpersonationLevelOption.Identify, AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent)> 

适用于