FaultReason Constructors

Definition

Initializes a new instance of the FaultReason class.

Overloads

FaultReason(IEnumerable<FaultReasonText>)

Initializes a new instance of the FaultReason class using the specified list of fault translations.

FaultReason(FaultReasonText)

Initializes a new instance of the FaultReason class using the specified text element that describes the fault in a specific language.

FaultReason(String)

Initializes a new instance of the FaultReason class using the specified fault description.

FaultReason(IEnumerable<FaultReasonText>)

Source:
FaultReason.cs
Source:
FaultReason.cs

Initializes a new instance of the FaultReason class using the specified list of fault translations.

C#
public FaultReason(System.Collections.Generic.IEnumerable<System.ServiceModel.FaultReasonText> translations);

Parameters

translations
IEnumerable<FaultReasonText>

A list of FaultReasonText objects; each object describes the fault in a specific language.

Exceptions

translations is null.

translations is empty or one or more items is null.

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

FaultReason(FaultReasonText)

Source:
FaultReason.cs
Source:
FaultReason.cs

Initializes a new instance of the FaultReason class using the specified text element that describes the fault in a specific language.

C#
public FaultReason(System.ServiceModel.FaultReasonText translation);

Parameters

translation
FaultReasonText

An array of FaultReasonText objects that correspond to fault descriptions in different languages.

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

FaultReason(String)

Source:
FaultReason.cs
Source:
FaultReason.cs

Initializes a new instance of the FaultReason class using the specified fault description.

C#
public FaultReason(string text);

Parameters

text
String

A description of the reason the fault occurred.

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0