InheritedExportAttribute Constructors

Definition

Initializes a new instance of the InheritedExportAttribute class.

Overloads

InheritedExportAttribute()

Initializes a new instance of the InheritedExportAttribute class.

InheritedExportAttribute(String)

Initializes a new instance of the InheritedExportAttribute class with the specified contract name.

InheritedExportAttribute(Type)

Initializes a new instance of the InheritedExportAttribute class with the specified contract type.

InheritedExportAttribute(String, Type)

Initializes a new instance of the InheritedExportAttribute class with the specified contract name and type.

InheritedExportAttribute()

Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs

Initializes a new instance of the InheritedExportAttribute class.

C#
public InheritedExportAttribute();

Remarks

The default contract name is the result of calling AttributedModelServices.GetContractName(Type) on the type itself that is marked with this attribute.

The contract name is compared using a case-sensitive, non-linguistic comparison using StringComparer.Ordinal.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)

InheritedExportAttribute(String)

Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs

Initializes a new instance of the InheritedExportAttribute class with the specified contract name.

C#
public InheritedExportAttribute(string? contractName);
C#
public InheritedExportAttribute(string contractName);

Parameters

contractName
String

The name of the contract.

Remarks

The default contract name is the result of calling AttributedModelServices.GetContractName(Type) on the type itself that this is marked with this attribute.

The contract name is compared using a case-sensitive, non-linguistic comparison using StringComparer.Ordinal.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)

InheritedExportAttribute(Type)

Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs

Initializes a new instance of the InheritedExportAttribute class with the specified contract type.

C#
public InheritedExportAttribute(Type? contractType);
C#
public InheritedExportAttribute(Type contractType);

Parameters

contractType
Type

The type of the contract.

Remarks

The contract name is the result of calling AttributedModelServices.GetContractName(Type) on contractType.

The default contract name is the result of calling AttributedModelServices.GetContractName(Type) on the type itself that is marked with this attribute.

The contract name is compared using a case-sensitive, non-linguistic comparison using StringComparer.Ordinal.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)

InheritedExportAttribute(String, Type)

Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs
Source:
InheritedExportAttribute.cs

Initializes a new instance of the InheritedExportAttribute class with the specified contract name and type.

C#
public InheritedExportAttribute(string? contractName, Type? contractType);
C#
public InheritedExportAttribute(string contractName, Type contractType);

Parameters

contractName
String

The name of the contract.

contractType
Type

The type of the contract.

Remarks

The default contract name is the result of calling AttributedModelServices.GetContractName(Type) on the type itself that this is marked with this attribute.

The contract name is compared using a case-sensitive, non-linguistic comparison using StringComparer.Ordinal.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)