C# Class System.Composition.Convention.ImportConventionBuilder

Afficher le fichier Open project: mikedn/runtime Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
BuildAttributes ( Type type, List &attributes ) : void
ImportConventionBuilder ( ) : System.Collections.Generic
IsSupportedImportManyType ( TypeInfo typeInfo ) : bool

Method Details

AddMetadataConstraint() public méthode

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.
Résultat ImportConventionBuilder

AddMetadataConstraint() public méthode

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.
Résultat ImportConventionBuilder

AllowDefault() public méthode

Allow the import to receive the default value for its type if the contract cannot be supplied by another part.
public AllowDefault ( ) : ImportConventionBuilder
Résultat ImportConventionBuilder

AsContractName() public méthode

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.
Résultat ImportConventionBuilder

AsContractName() public méthode

Specify the contract name for the import.
public AsContractName ( string contractName ) : ImportConventionBuilder
contractName string
Résultat ImportConventionBuilder

AsMany() public méthode

Configure the import to receive all exports of the contract.
public AsMany ( ) : ImportConventionBuilder
Résultat ImportConventionBuilder

AsMany() public méthode

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.
Résultat ImportConventionBuilder