다음을 통해 공유


ComposablePart.SetImport(ImportDefinition, IEnumerable<Export>) 메서드

정의

지정된 ImportDefinition 개체에서 설명하는 가져오기가 지정된 내보내기로 충족되도록 설정합니다.

public:
 abstract void SetImport(System::ComponentModel::Composition::Primitives::ImportDefinition ^ definition, System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::Export ^> ^ exports);
public abstract void SetImport (System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export> exports);
abstract member SetImport : System.ComponentModel.Composition.Primitives.ImportDefinition * seq<System.ComponentModel.Composition.Primitives.Export> -> unit
Public MustOverride Sub SetImport (definition As ImportDefinition, exports As IEnumerable(Of Export))

매개 변수

definition
ImportDefinition

설정할 가져오기를 지정하는 ImportDefinitions 속성의 개체 중 하나입니다.

exports
IEnumerable<Export>

definition에서 설명하는 가져오기를 설정할 Export 개체의 컬렉션입니다.

예외

ComposablePart 개체가 삭제되었습니다.

definition이(가) null인 경우

또는

exports이(가) null인 경우

ImportDefinition 개체에서 설명한 가져오기를 설정하는 동안 오류가 발생했습니다.

definitionImportDefinitionsComposablePart 속성에서 제공되지 않았습니다.

또는

exportsnull인 요소가 포함된 경우

또는

exports가 비어 있고 CardinalityExactlyOne입니다.

또는

exports는 둘 이상의 요소를 포함하고 있고 CardinalityZeroOrOne 또는 ExactlyOne입니다.

적용 대상