Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ImportAttribute Class

.NET Framework (current version)
 

Specifies that a property, field, or parameter value should be provided by the host container.

Namespace:   System.Composition
Assembly:  System.Composition.AttributedModel (in System.Composition.AttributedModel.dll)

System::Object
System::Attribute
System.Composition::ImportAttribute

[AttributeUsageAttribute(AttributeTargets::Property | AttributeTargets::Parameter, 
	AllowMultiple = false, Inherited = false)]
public ref class ImportAttribute : Attribute

NameDescription
System_CAPS_pubmethodImportAttribute()

Initializes a new instance of the ImportAttribute class, importing the export with the default contract name.

System_CAPS_pubmethodImportAttribute(String^)

Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name.

NameDescription
System_CAPS_pubpropertyAllowDefault

Gets or sets a value that indicates whether the property, field, or parameter will be set to its type's default value when an export with the contract name is not present in the container.

System_CAPS_pubpropertyContractName

Gets the contract name of the export to import.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Attribute.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object^)

(Inherited from Attribute.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft