PrincipalCollection.Remove 메서드

정의

컬렉션에서 지정된 보안 주체를 제거하고, 지정된 보안 주체 개체가 컬렉션의 멤버이면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

오버로드

Remove(ComputerPrincipal)

컬렉션에서 지정된 ComputerPrincipal 개체를 제거하고, ComputerPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

Remove(GroupPrincipal)

컬렉션에서 지정된 GroupPrincipal 개체를 제거하고, GroupPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

Remove(Principal)

컬렉션에서 지정된 Principal 개체를 제거하고, Principal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

Remove(UserPrincipal)

컬렉션에서 지정된 UserPrincipal 개체를 제거하고, UserPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

Remove(PrincipalContext, IdentityType, String)

컬렉션에서 특정 PrincipalContextidentityType/identityValue 쌍으로 지정된 UserPrincipal 개체를 찾고, 식별된 Principal이 이 PrincipalCollection의 멤버였으면 true를 반환하고, 그렇지 않으면 메서드에 대해 어떠한 작업도 수행하지 않고 false를 반환합니다.

설명

와 마찬가지로 Add, 및 Contains 이 함수에 4 개의 오버 로드가 있지만 모두 동일한 작업을 수행 합니다. 추가 오버로드는 유용성을 향상시키기 위해 구현되므로 IntelliSense를 사용하는 개발자는 , GroupPrincipal또는 ComputerPrincipal 개체를 사용하는 오버로드를 UserPrincipal볼 수 있습니다. 호출 하는 것은 사용자, 그룹 또는 컴퓨터 오버 로드 중 하나를 호출 합니다 Principal 오버 로드 합니다.

Remove(ComputerPrincipal)

Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs

컬렉션에서 지정된 ComputerPrincipal 개체를 제거하고, ComputerPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

public:
 bool Remove(System::DirectoryServices::AccountManagement::ComputerPrincipal ^ computer);
public bool Remove (System.DirectoryServices.AccountManagement.ComputerPrincipal computer);
[System.Security.SecurityCritical]
public bool Remove (System.DirectoryServices.AccountManagement.ComputerPrincipal computer);
member this.Remove : System.DirectoryServices.AccountManagement.ComputerPrincipal -> bool
[<System.Security.SecurityCritical>]
member this.Remove : System.DirectoryServices.AccountManagement.ComputerPrincipal -> bool
Public Function Remove (computer As ComputerPrincipal) As Boolean

매개 변수

computer
ComputerPrincipal

ComputerPrincipal 개체입니다.

반환

ComputerPrincipal이 이 PrincipalCollection의 멤버인 경우 true이고, 그렇지 않으면 false입니다.

특성

설명

이 함수는 다음과 같은 예외를 throw 할 수 있습니다.

예외 설명
InvalidOperationException 이 메서드를 호출한 합니다 Members 도메인 그룹 및 제거할 도메인 보안 주체에 대 한 컬렉션 됨 그룹의 멤버인 해당 primaryGroupId 특성입니다.

적용 대상

Remove(GroupPrincipal)

Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs

컬렉션에서 지정된 GroupPrincipal 개체를 제거하고, GroupPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

public:
 bool Remove(System::DirectoryServices::AccountManagement::GroupPrincipal ^ group);
public bool Remove (System.DirectoryServices.AccountManagement.GroupPrincipal group);
[System.Security.SecurityCritical]
public bool Remove (System.DirectoryServices.AccountManagement.GroupPrincipal group);
member this.Remove : System.DirectoryServices.AccountManagement.GroupPrincipal -> bool
[<System.Security.SecurityCritical>]
member this.Remove : System.DirectoryServices.AccountManagement.GroupPrincipal -> bool
Public Function Remove (group As GroupPrincipal) As Boolean

매개 변수

group
GroupPrincipal

GroupPrincipal 개체입니다.

반환

GroupPrincipal이 이 PrincipalCollection의 멤버인 경우 true이고, 그렇지 않으면 false입니다.

특성

설명

이 함수는 다음과 같은 예외를 throw 할 수 있습니다.

예외 설명
InvalidOperationException 이 메서드를 호출한 합니다 Members 도메인 그룹 및 제거할 도메인 보안 주체에 대 한 컬렉션 됨 그룹의 멤버인 해당 primaryGroupId 특성입니다.

적용 대상

Remove(Principal)

Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs

컬렉션에서 지정된 Principal 개체를 제거하고, Principal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

public:
 virtual bool Remove(System::DirectoryServices::AccountManagement::Principal ^ principal);
public bool Remove (System.DirectoryServices.AccountManagement.Principal principal);
[System.Security.SecurityCritical]
public bool Remove (System.DirectoryServices.AccountManagement.Principal principal);
abstract member Remove : System.DirectoryServices.AccountManagement.Principal -> bool
override this.Remove : System.DirectoryServices.AccountManagement.Principal -> bool
[<System.Security.SecurityCritical>]
abstract member Remove : System.DirectoryServices.AccountManagement.Principal -> bool
override this.Remove : System.DirectoryServices.AccountManagement.Principal -> bool
Public Function Remove (principal As Principal) As Boolean

매개 변수

principal
Principal

Principal 개체입니다.

반환

Principal이 이 PrincipalCollection의 멤버인 경우 true이고, 그렇지 않으면 false입니다.

구현

특성

설명

이 함수는 다음과 같은 예외를 throw 할 수 있습니다.

예외 설명
InvalidOperationException 이 메서드를 호출한 합니다 Members 도메인 그룹 및 제거할 도메인 보안 주체에 대 한 컬렉션 됨 그룹의 멤버인 해당 primaryGroupId 특성입니다.

적용 대상

Remove(UserPrincipal)

Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs

컬렉션에서 지정된 UserPrincipal 개체를 제거하고, UserPrincipal이 이 PrincipalCollection의 멤버였으면 true를 반환합니다. 그렇지 않으면 아무 작업도 수행하지 않고 false를 반환합니다.

public:
 bool Remove(System::DirectoryServices::AccountManagement::UserPrincipal ^ user);
public bool Remove (System.DirectoryServices.AccountManagement.UserPrincipal user);
[System.Security.SecurityCritical]
public bool Remove (System.DirectoryServices.AccountManagement.UserPrincipal user);
member this.Remove : System.DirectoryServices.AccountManagement.UserPrincipal -> bool
[<System.Security.SecurityCritical>]
member this.Remove : System.DirectoryServices.AccountManagement.UserPrincipal -> bool
Public Function Remove (user As UserPrincipal) As Boolean

매개 변수

user
UserPrincipal

UserPrincipal 개체입니다.

반환

UserPrincipal이 이 PrincipalCollection의 멤버인 경우 true이고, 그렇지 않으면 false입니다.

특성

설명

이 함수는 다음과 같은 예외를 throw 할 수 있습니다.

예외 설명
InvalidOperationException 이 메서드를 호출한 합니다 Members 도메인 그룹 및 제거할 도메인 보안 주체에 대 한 컬렉션 됨 그룹의 멤버인 해당 primaryGroupId 특성입니다.

적용 대상

Remove(PrincipalContext, IdentityType, String)

Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs
Source:
PrincipalCollection.cs

컬렉션에서 특정 PrincipalContextidentityType/identityValue 쌍으로 지정된 UserPrincipal 개체를 찾고, 식별된 Principal이 이 PrincipalCollection의 멤버였으면 true를 반환하고, 그렇지 않으면 메서드에 대해 어떠한 작업도 수행하지 않고 false를 반환합니다.

public:
 bool Remove(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, System::DirectoryServices::AccountManagement::IdentityType identityType, System::String ^ identityValue);
public bool Remove (System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue);
[System.Security.SecurityCritical]
public bool Remove (System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue);
member this.Remove : System.DirectoryServices.AccountManagement.PrincipalContext * System.DirectoryServices.AccountManagement.IdentityType * string -> bool
[<System.Security.SecurityCritical>]
member this.Remove : System.DirectoryServices.AccountManagement.PrincipalContext * System.DirectoryServices.AccountManagement.IdentityType * string -> bool
Public Function Remove (context As PrincipalContext, identityType As IdentityType, identityValue As String) As Boolean

매개 변수

context
PrincipalContext

PrincipalContext 개체입니다.

identityType
IdentityType

identityValue의 형식을 식별하는 IdentityType입니다.

identityValue
String

문자열

반환

식별된 Principal이 이 PrincipalCollection의 멤버인 경우 true이고, 그렇지 않으면 false입니다.

특성

설명

이 함수는 다음과 같은 예외를 throw 할 수 있습니다.

예외 설명
InvalidOperationException 이 메서드를 호출한 합니다 Members 도메인 그룹 및 제거할 도메인 보안 주체에 대 한 컬렉션 됨 그룹의 멤버인 해당 primaryGroupId 특성입니다.
NoMatchingPrincipalException 지정된 된 매개 변수와 일치 하는 보안 주체가 없는 찾을 수 있습니다.
MultipleMatchesException 둘 이상의 보안 주체는 지정된 된 매개 변수를 찾습니다. 이론적으로이 발생 해서는 안 되므로 Add 컬렉션에 중복 된 보안 주체를 추가 하 려 할 때 예외를 throw 합니다. 그러나 다른 API 만들어 중복 되는 것입니다.
ArgumentException identityType이 빈 문자열인 경우

적용 대상