SecurityException 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
SecurityException 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| SecurityException() |
기본 속성을 사용하여 클래스의 새 인스턴스를 SecurityException 초기화합니다. |
| SecurityException(String) |
지정된 오류 메시지를 사용하여 클래스의 SecurityException 새 인스턴스를 초기화합니다. |
| SecurityException(SerializationInfo, StreamingContext) |
사용되지 않음.
직렬화된 데이터를 사용하여 클래스의 새 인스턴스를 SecurityException 초기화합니다. |
| SecurityException(String, Exception) |
지정된 오류 메시지와 이 예외의 SecurityException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다. |
| SecurityException(String, Type) |
지정된 오류 메시지와 예외가 SecurityException throw된 사용 권한 유형을 사용하여 클래스의 새 인스턴스를 초기화합니다. |
| SecurityException(String, Type, String) |
지정된 오류 메시지, 예외를 throw한 사용 권한 유형 및 사용 권한 상태를 사용하여 클래스의 새 인스턴스 SecurityException 를 초기화합니다. |
| SecurityException(String, Object, Object, MethodInfo, Object, IPermission) |
스택에서 거부로 인한 예외에 대한 클래스의 SecurityException 새 인스턴스를 초기화합니다. |
| SecurityException(String, AssemblyName, PermissionSet, PermissionSet, MethodInfo, SecurityAction, Object, IPermission, Evidence) |
권한 부여 집합이 부족하여 발생하는 예외에 대한 클래스의 SecurityException 새 인스턴스를 초기화합니다. |
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
SecurityException()
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
기본 속성을 사용하여 클래스의 새 인스턴스를 SecurityException 초기화합니다.
public:
SecurityException();
public SecurityException();
Public Sub New ()
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
다음 표에서는 클래스 인스턴스의 초기 속성 값을 보여 줍니다 SecurityException .
| 재산 | 가치 |
|---|---|
| InnerException | Null 참조(Nothing Visual Basic의 경우)입니다. |
| Message | 지역화된 오류 메시지 문자열입니다. |
적용 대상
SecurityException(String)
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
지정된 오류 메시지를 사용하여 클래스의 SecurityException 새 인스턴스를 초기화합니다.
public:
SecurityException(System::String ^ message);
public SecurityException(string message);
public SecurityException(string? message);
new System.Security.SecurityException : string -> System.Security.SecurityException
Public Sub New (message As String)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
다음 표에서는 클래스 인스턴스의 초기 속성 값을 보여 줍니다 SecurityException .
| 재산 | 가치 |
|---|---|
| InnerException | Null 참조(Nothing Visual Basic의 경우)입니다. |
| Message | 지역화된 오류 메시지 문자열입니다. |
적용 대상
SecurityException(SerializationInfo, StreamingContext)
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
주의
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
직렬화된 데이터를 사용하여 클래스의 새 인스턴스를 SecurityException 초기화합니다.
protected:
SecurityException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.SecurityException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.SecurityException
new System.Security.SecurityException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.SecurityException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
매개 변수
- info
- SerializationInfo
serialize된 개체 데이터를 보유하는 개체입니다.
- context
- StreamingContext
원본 또는 대상에 대한 컨텍스트 정보입니다.
- 특성
예외
info은 null입니다.
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
이 생성자는 역직렬화 중에 호출되어 스트림을 통해 전송되는 예외 개체를 다시 구성합니다.
이 생성자는 매개 변수의 정보를 info 기반으로 다음 속성 값을 설정합니다.
적용 대상
SecurityException(String, Exception)
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
지정된 오류 메시지와 이 예외의 SecurityException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
SecurityException(System::String ^ message, Exception ^ inner);
public SecurityException(string message, Exception inner);
public SecurityException(string? message, Exception? inner);
new System.Security.SecurityException : string * Exception -> System.Security.SecurityException
Public Sub New (message As String, inner As Exception)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- inner
- Exception
현재 예외의 원인인 예외입니다. 매개 변수가 inner 아닌 null경우 내부 예외를 catch 처리하는 블록에서 현재 예외가 발생합니다.
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
이전 예외의 직접적인 결과로 throw되는 예외에는 속성의 이전 예외에 대한 참조가 InnerException 포함되어야 합니다. 속성 생성 InnerException 자에 전달 되는 동일한 값을 반환 하거나 null 속성 생성자에 내부 예외 값을 제공 하지 않는 경우 InnerException .
다음 표에서는 클래스 인스턴스의 초기 속성 값을 보여 줍니다 SecurityException .
| 재산 | 가치 |
|---|---|
| InnerException | 내부 예외 참조입니다. |
| Message | 지역화된 오류 메시지 문자열입니다. |
추가 정보
적용 대상
SecurityException(String, Type)
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
지정된 오류 메시지와 예외가 SecurityException throw된 사용 권한 유형을 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
SecurityException(System::String ^ message, Type ^ type);
public SecurityException(string? message, Type? type);
public SecurityException(string message, Type type);
new System.Security.SecurityException : string * Type -> System.Security.SecurityException
Public Sub New (message As String, type As Type)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- type
- Type
예외를 throw한 사용 권한의 형식입니다.
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
다음 표에서는 이 생성자가 설정한 속성 값을 보여줍니다.
| 재산 | 가치 |
|---|---|
| Message | 로 지정된 지역화된 오류 메시지 문자열입니다 message. |
| PermissionType |
Type 에 의해 type지정된 실패한 사용 권한의 |
적용 대상
SecurityException(String, Type, String)
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
- Source:
- SecurityException.cs
지정된 오류 메시지, 예외를 throw한 사용 권한 유형 및 사용 권한 상태를 사용하여 클래스의 새 인스턴스 SecurityException 를 초기화합니다.
public:
SecurityException(System::String ^ message, Type ^ type, System::String ^ state);
public SecurityException(string? message, Type? type, string? state);
public SecurityException(string message, Type type, string state);
new System.Security.SecurityException : string * Type * string -> System.Security.SecurityException
Public Sub New (message As String, type As Type, state As String)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- type
- Type
예외를 throw한 사용 권한의 형식입니다.
- state
- String
예외가 throw된 권한의 상태입니다.
예제
생성자 사용 예제는 SecurityException 생성자에 제공된 예제를 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 참조하세요.
설명
다음 표에서는 이 생성자가 설정한 속성 값을 보여줍니다.
| 재산 | 가치 |
|---|---|
| Message | 로 지정된 지역화된 오류 메시지 문자열입니다 message. |
| PermissionType |
Type 에 의해 type지정된 실패한 사용 권한의 |
| Demanded | 실패한 요청된 보안 권한, 권한 집합 또는 사용 권한 집합 컬렉션입니다. |
적용 대상
SecurityException(String, Object, Object, MethodInfo, Object, IPermission)
스택에서 거부로 인한 예외에 대한 클래스의 SecurityException 새 인스턴스를 초기화합니다.
public:
SecurityException(System::String ^ message, System::Object ^ deny, System::Object ^ permitOnly, System::Reflection::MethodInfo ^ method, System::Object ^ demanded, System::Security::IPermission ^ permThatFailed);
public SecurityException(string message, object deny, object permitOnly, System.Reflection.MethodInfo method, object demanded, System.Security.IPermission permThatFailed);
new System.Security.SecurityException : string * obj * obj * System.Reflection.MethodInfo * obj * System.Security.IPermission -> System.Security.SecurityException
Public Sub New (message As String, deny As Object, permitOnly As Object, method As MethodInfo, demanded As Object, permThatFailed As IPermission)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- deny
- Object
거부된 사용 권한 또는 사용 권한 집합입니다.
- permitOnly
- Object
허가 전용 사용 권한 또는 사용 권한 집합입니다.
- method
- MethodInfo
MethodInfo 예외가 발생한 메서드를 식별하는 A입니다.
- demanded
- Object
요청된 사용 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다.
- permThatFailed
- IPermission
IPermission 실패한 사용 권한을 식별하는 항목입니다.
예제
다음 코드 예제에서는 생성자의 SecurityException(String, Object, Object, MethodInfo, Object, IPermission) 사용을 보여 있습니다.
// Demonstrate the SecurityException constructor
// by throwing the exception again.
Display("Rethrowing the exception thrown as a "
"result of a PermitOnly security action.");
throw gcnew SecurityException(exception->Message,
exception->DenySetInstance,
exception->PermitOnlySetInstance,
exception->Method, exception->Demanded,
exception->FirstPermissionThatFailed);
//Demonstrate the SecurityException constructor by
// throwing the exception again.
Display("Rethrowing the exception thrown as a result of a " +
"PermitOnly security action.");
throw new SecurityException(sE.Message, sE.DenySetInstance,
sE.PermitOnlySetInstance, sE.Method, sE.Demanded,
(IPermission)sE.FirstPermissionThatFailed);
' Demonstrate the SecurityException constructor by
' throwing the exception again.
Display("Rethrowing the exception thrown as a result of a " & _
"PermitOnly security action.")
Throw New SecurityException(sE.Message, sE.DenySetInstance, _
sE.PermitOnlySetInstance, sE.Method, sE.Demanded, _
CType(sE.FirstPermissionThatFailed, IPermission))
설명
Deny가 포함된 프레임으로 인해 수요 오류가 발생한 경우 이 생성자를 사용합니다. 다음 표에서는 이 생성자가 설정한 속성 값을 보여줍니다.
| 재산 | 가치 |
|---|---|
| Message | 로 지정된 지역화된 오류 메시지 문자열입니다 message. |
| FirstPermissionThatFailed | 에서 지정 permThatFailed한 사용 권한 집합 또는 사용 권한 집합 컬렉션의 첫 번째 권한입니다. |
| GrantedSet | 빈 문자열입니다. |
| Demanded | 에 지정된 demanded보안 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다. |
| RefusedSet | 빈 문자열입니다. |
| DenySetInstance | 에서 지정 deny한 거부된 보안 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다. |
| PermitOnlySetInstance | 에 지정된 permitOnly사용 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다. |
| FailedAssemblyInfo |
null; |
| Method | 에 지정된 method형식입니다MethodInfo. |
| Zone | NoZone; |
| Url | 빈 문자열입니다. |
적용 대상
SecurityException(String, AssemblyName, PermissionSet, PermissionSet, MethodInfo, SecurityAction, Object, IPermission, Evidence)
권한 부여 집합이 부족하여 발생하는 예외에 대한 클래스의 SecurityException 새 인스턴스를 초기화합니다.
public:
SecurityException(System::String ^ message, System::Reflection::AssemblyName ^ assemblyName, System::Security::PermissionSet ^ grant, System::Security::PermissionSet ^ refused, System::Reflection::MethodInfo ^ method, System::Security::Permissions::SecurityAction action, System::Object ^ demanded, System::Security::IPermission ^ permThatFailed, System::Security::Policy::Evidence ^ evidence);
public SecurityException(string message, System.Reflection.AssemblyName assemblyName, System.Security.PermissionSet grant, System.Security.PermissionSet refused, System.Reflection.MethodInfo method, System.Security.Permissions.SecurityAction action, object demanded, System.Security.IPermission permThatFailed, System.Security.Policy.Evidence evidence);
new System.Security.SecurityException : string * System.Reflection.AssemblyName * System.Security.PermissionSet * System.Security.PermissionSet * System.Reflection.MethodInfo * System.Security.Permissions.SecurityAction * obj * System.Security.IPermission * System.Security.Policy.Evidence -> System.Security.SecurityException
Public Sub New (message As String, assemblyName As AssemblyName, grant As PermissionSet, refused As PermissionSet, method As MethodInfo, action As SecurityAction, demanded As Object, permThatFailed As IPermission, evidence As Evidence)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- assemblyName
- AssemblyName
AssemblyName 예외를 발생시킨 어셈블리의 이름을 지정하는 형식입니다.
- grant
- PermissionSet
어셈블리에 부여된 사용 권한을 나타내는 A PermissionSet 입니다.
- refused
- PermissionSet
거부된 사용 권한 또는 사용 권한 집합을 나타내는 A PermissionSet 입니다.
- method
- MethodInfo
MethodInfo 예외가 발생한 메서드를 나타내는 A입니다.
- action
- SecurityAction
값 중 SecurityAction 하나입니다.
- demanded
- Object
요청된 사용 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다.
- permThatFailed
- IPermission
IPermission 실패한 권한을 나타내는 값입니다.
설명
이 생성자를 사용하여 권한 부여 집합으로 인해 요청 실패가 발생한 경우 예외를 throw합니다.
다음 표에서는 이 생성자가 설정한 속성 값을 보여줍니다.
| 재산 | 가치 |
|---|---|
| Message | 로 지정된 지역화된 오류 메시지 문자열입니다 message. |
| FirstPermissionThatFailed | 에서 지정 permThatFailed한 사용 권한 집합 또는 사용 권한 집합 컬렉션의 첫 번째 권한입니다. |
| GrantedSet | 에 지정된 grant형식입니다PermissionSet. |
| Demanded | 에 의해 지정된 demanded실패한 요청된 보안 권한, 사용 권한 집합 또는 사용 권한 집합 컬렉션입니다. |
| RefusedSet | 에 지정된 refused형식입니다PermissionSet. |
| DenySetInstance | 빈 문자열입니다. |
| PermitOnlySetInstance | 빈 문자열입니다. |
| FailedAssemblyInfo | 에 지정된 assemblyName형식입니다AssemblyName. |
| Method | 에 지정된 method형식입니다MethodInfo. |
| Zone | 에 SecurityZone 지정된 evidence값 Evidence 입니다. |
| Url | 에 지정된 evidenceURL Evidence 입니다. |