ImportAttribute Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ImportAttribute class.
Overloads
ImportAttribute() |
Initializes a new instance of the ImportAttribute class, importing the export with the default contract name. |
ImportAttribute(String) |
Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name. |
ImportAttribute(Type) |
Initializes a new instance of the ImportAttribute class, importing the export with the contract name derived from the specified type. |
ImportAttribute(String, Type) |
Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name and type. |
ImportAttribute()
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
Initializes a new instance of the ImportAttribute class, importing the export with the default contract name.
public:
ImportAttribute();
public ImportAttribute ();
Public Sub New ()
Remarks
The default contract name is the result of calling the GetContractName method on the property, field, or parameter type that this is marked with this attribute.
The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.
Applies to
ImportAttribute(String)
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name.
public:
ImportAttribute(System::String ^ contractName);
public ImportAttribute (string? contractName);
public ImportAttribute (string contractName);
new System.ComponentModel.Composition.ImportAttribute : string -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractName As String)
Parameters
- contractName
- String
The contract name of the export to import, or null
or an empty string ("") to use the default contract name.
Remarks
The default contract name is the result of calling the GetContractName method on the property, field, or parameter type that is marked with this attribute.
The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.
Applies to
ImportAttribute(Type)
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
Initializes a new instance of the ImportAttribute class, importing the export with the contract name derived from the specified type.
public:
ImportAttribute(Type ^ contractType);
public ImportAttribute (Type? contractType);
public ImportAttribute (Type contractType);
new System.ComponentModel.Composition.ImportAttribute : Type -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractType As Type)
Parameters
- contractType
- Type
The type to derive the contract name of the export from, or null
to use the default contract name.
Remarks
The contract name is the result of calling the GetContractName method on contractType
.
The default contract name is the result of calling the GetContractName method on the property, field, or parameter type that is marked with this attribute.
The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.
Applies to
ImportAttribute(String, Type)
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
- Source:
- ImportAttribute.cs
Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name and type.
public:
ImportAttribute(System::String ^ contractName, Type ^ contractType);
public ImportAttribute (string? contractName, Type? contractType);
public ImportAttribute (string contractName, Type contractType);
new System.ComponentModel.Composition.ImportAttribute : string * Type -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractName As String, contractType As Type)
Parameters
- contractName
- String
The contract name of the export to import, or null
or an empty string ("") to use the default contract name.
- contractType
- Type
The type of the export to import.