C# Класс System.Composition.Convention.ImportConventionBuilder

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddMetadataConstraint ( string name, Func getConstraintValueFromPartType ) : ImportConventionBuilder

Add an import constraint

AddMetadataConstraint ( string name, object value ) : ImportConventionBuilder

Add an import constraint

AllowDefault ( ) : ImportConventionBuilder

Allow the import to receive the default value for its type if the contract cannot be supplied by another part.

AsContractName ( Func getContractNameFromPartType ) : ImportConventionBuilder

Specify the contract name for the export.

AsContractName ( string contractName ) : ImportConventionBuilder

Specify the contract name for the import.

AsMany ( ) : ImportConventionBuilder

Configure the import to receive all exports of the contract.

AsMany ( bool isMany ) : ImportConventionBuilder

Configure the import to receive all exports of the contract.

Приватные методы

Метод Описание
BuildAttributes ( Type type, List &attributes ) : void
ImportConventionBuilder ( ) : System.Collections.Generic
IsSupportedImportManyType ( TypeInfo typeInfo ) : bool

Описание методов

AddMetadataConstraint() публичный Метод

Add an import constraint
public AddMetadataConstraint ( string name, Func getConstraintValueFromPartType ) : ImportConventionBuilder
name string The name of the constraint item.
getConstraintValueFromPartType Func A function that calculates the value to match.
Результат ImportConventionBuilder

AddMetadataConstraint() публичный Метод

Add an import constraint
public AddMetadataConstraint ( string name, object value ) : ImportConventionBuilder
name string The name of the constraint item.
value object The value to match.
Результат ImportConventionBuilder

AllowDefault() публичный Метод

Allow the import to receive the default value for its type if the contract cannot be supplied by another part.
public AllowDefault ( ) : ImportConventionBuilder
Результат ImportConventionBuilder

AsContractName() публичный Метод

Specify the contract name for the export.
public AsContractName ( Func getContractNameFromPartType ) : ImportConventionBuilder
getContractNameFromPartType Func A Func to retrieve the contract name from the part typeThe contract name.
Результат ImportConventionBuilder

AsContractName() публичный Метод

Specify the contract name for the import.
public AsContractName ( string contractName ) : ImportConventionBuilder
contractName string
Результат ImportConventionBuilder

AsMany() публичный Метод

Configure the import to receive all exports of the contract.
public AsMany ( ) : ImportConventionBuilder
Результат ImportConventionBuilder

AsMany() публичный Метод

Configure the import to receive all exports of the contract.
public AsMany ( bool isMany ) : ImportConventionBuilder
isMany bool True if the import receives all values; otherwise false.
Результат ImportConventionBuilder