HostProtectionException Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginisialisasi instans baru dari kelas HostProtectionException.
Overload
| Nama | Deskripsi |
|---|---|
| HostProtectionException() |
Menginisialisasi instans baru kelas HostProtectionException dengan nilai default. |
| HostProtectionException(String) |
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu. |
| HostProtectionException(SerializationInfo, StreamingContext) |
Kedaluwarsa.
Menginisialisasi instans HostProtectionException baru kelas menggunakan informasi serialisasi yang disediakan dan konteks streaming. |
| HostProtectionException(String, Exception) |
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu dan referensi ke pengecualian dalam yang merupakan penyebab pengecualian ini. |
| HostProtectionException(String, HostProtectionResource, HostProtectionResource) |
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu, sumber daya host yang dilindungi, dan sumber daya host yang menyebabkan pengecualian dilemparkan. |
HostProtectionException()
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
Menginisialisasi instans baru kelas HostProtectionException dengan nilai default.
public:
HostProtectionException();
public HostProtectionException();
Public Sub New ()
Keterangan
Tabel berikut menunjukkan nilai properti awal untuk instans HostProtectionException kelas.
| Harta benda | Nilai |
|---|---|
| ProtectedResources | HostProtectionResource.None |
| DemandedResources | HostProtectionResource.None |
Berlaku untuk
HostProtectionException(String)
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu.
public:
HostProtectionException(System::String ^ message);
public HostProtectionException(string message);
new System.Security.HostProtectionException : string -> System.Security.HostProtectionException
Public Sub New (message As String)
Parameter
- message
- String
Pesan yang menjelaskan kesalahan.
Keterangan
Konten message parameter harus dapat dimengerti oleh pengguna. Pemanggil konstruktor ini diperlukan untuk memastikan bahwa string ini telah dilokalkan untuk budaya sistem saat ini.
Berlaku untuk
HostProtectionException(SerializationInfo, StreamingContext)
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
Perhatian
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Menginisialisasi instans HostProtectionException baru kelas menggunakan informasi serialisasi yang disediakan dan konteks streaming.
protected:
HostProtectionException(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 HostProtectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected HostProtectionException(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.HostProtectionException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.HostProtectionException
new System.Security.HostProtectionException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.HostProtectionException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parameter
- info
- SerializationInfo
Objek yang menyimpan data objek berseri.
- context
- StreamingContext
Informasi kontekstual tentang sumber atau tujuan.
- Atribut
Pengecualian
info adalah null.
Keterangan
Konstruktor ini dipanggil selama deserialisasi untuk membangun kembali objek pengecualian yang dikirimkan melalui aliran.
Berlaku untuk
HostProtectionException(String, Exception)
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu dan referensi ke pengecualian dalam yang merupakan penyebab pengecualian ini.
public:
HostProtectionException(System::String ^ message, Exception ^ e);
public HostProtectionException(string message, Exception e);
new System.Security.HostProtectionException : string * Exception -> System.Security.HostProtectionException
Public Sub New (message As String, e As Exception)
Parameter
- message
- String
Pesan kesalahan yang menjelaskan alasan pengecualian.
Pengecualian yang merupakan penyebab pengecualian saat ini.
innerException Jika parameter bukan null, pengecualian saat ini dimunculkan dalam catch blok yang menangani pengecualian dalam.
Keterangan
Pengecualian yang dilemparkan sebagai hasil langsung dari pengecualian sebelumnya dapat menyertakan referensi ke pengecualian sebelumnya dalam InnerException properti . Properti InnerException mengembalikan nilai yang sama yang diteruskan ke konstruktor, atau null jika InnerException properti tidak menyediakan nilai pengecualian dalam ke konstruktor.
Berlaku untuk
HostProtectionException(String, HostProtectionResource, HostProtectionResource)
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
- Sumber:
- HostProtectionException.cs
Menginisialisasi instans HostProtectionException baru kelas dengan pesan kesalahan tertentu, sumber daya host yang dilindungi, dan sumber daya host yang menyebabkan pengecualian dilemparkan.
public:
HostProtectionException(System::String ^ message, System::Security::Permissions::HostProtectionResource protectedResources, System::Security::Permissions::HostProtectionResource demandedResources);
public HostProtectionException(string message, System.Security.Permissions.HostProtectionResource protectedResources, System.Security.Permissions.HostProtectionResource demandedResources);
new System.Security.HostProtectionException : string * System.Security.Permissions.HostProtectionResource * System.Security.Permissions.HostProtectionResource -> System.Security.HostProtectionException
Public Sub New (message As String, protectedResources As HostProtectionResource, demandedResources As HostProtectionResource)
Parameter
- message
- String
Pesan kesalahan yang menjelaskan alasan pengecualian.
- protectedResources
- HostProtectionResource
Kombinasi bitwise dari nilai enumerasi yang menentukan sumber daya host yang tidak dapat diakses oleh kode yang dipercaya sebagian.
- demandedResources
- HostProtectionResource
Kombinasi bitwise dari nilai enumerasi yang menentukan sumber daya host yang diminta.
Keterangan
Parameter demandedResources menentukan kategori perlindungan host yang diminta yang menyebabkan pengecualian dilemparkan. Misalnya, misalkan metode memiliki HostProtectionAttribute atribut yang menunjukkan bahwa metode mengekspos status bersama. Ketika metode dipanggil, HostProtectionAttribute melakukan permintaan tautan untuk status bersama. Jika host telah menetapkan status bersama sebagai kategori yang dilarang, maka dinaikkan HostProtectionException dengan demandedResources nilai properti .HostProtectionResource.SharedState