FileSystemSecurity.AccessRuleFactory 메서드

정의

지정된 액세스 권한, 액세스 제어 및 플래그를 사용하여 지정된 사용자에 대한 새 액세스 제어 규칙을 나타내는 FileSystemAccessRule 클래스의 새 인스턴스를 초기화합니다.

public:
 override System::Security::AccessControl::AccessRule ^ AccessRuleFactory(System::Security::Principal::IdentityReference ^ identityReference, int accessMask, bool isInherited, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags, System::Security::AccessControl::AccessControlType type);
public override sealed System.Security.AccessControl.AccessRule AccessRuleFactory (System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type);
override this.AccessRuleFactory : System.Security.Principal.IdentityReference * int * bool * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags * System.Security.AccessControl.AccessControlType -> System.Security.AccessControl.AccessRule
Public Overrides NotOverridable Function AccessRuleFactory (identityReference As IdentityReference, accessMask As Integer, isInherited As Boolean, inheritanceFlags As InheritanceFlags, propagationFlags As PropagationFlags, type As AccessControlType) As AccessRule

매개 변수

identityReference
IdentityReference

사용자 계정을 나타내는 IdentityReference 개체입니다.

accessMask
Int32

액세스 형식을 지정하는 정수입니다.

isInherited
Boolean

액세스 규칙이 상속된 것이면 true이고, 그렇지 않으면 false입니다.

inheritanceFlags
InheritanceFlags

자식 개체에 액세스 마스크를 전파하는 방법을 지정하는 InheritanceFlags 값 중 하나입니다.

propagationFlags
PropagationFlags

자식 개체에 ACE(액세스 제어 항목)를 전파하는 방법을 지정하는 PropagationFlags 값 중 하나입니다.

type
AccessControlType

액세스가 허용되는지 여부를 지정하는 AccessControlType 값 중 하나입니다.

반환

지정된 액세스 권한, 액세스 제어 및 플래그를 사용하여 지정된 사용자에 대한 새 액세스 제어 규칙을 나타내는 새 FileSystemAccessRule 개체입니다.

예외

잘못된 값이 accessMask, inheritanceFlags, propagationFlags 또는 type 매개 변수에 지정된 경우

identityReference 매개 변수가 null인 경우

또는

accessMask 매개 변수가 0인 경우

identityReference 매개 변수가 SecurityIdentifier 형식이 아니고, NTAccount 형식으로 변환할 수 있는 SecurityIdentifier 형식도 아닌 경우

설명

액세스 제어 규칙을 만드는 권장 방법은 클래스의 생성자를 사용하는 것입니다 FileSystemAccessRule .

메서드의 AccessRuleFactory 반환 형식은 기본 클래스이지만 AccessRule반환 값은 파생 클래스로 안전하게 캐스팅할 수 있습니다.

적용 대상