System.Composition.Convention.ImportConventionBuilder.AsContractName C# (CSharp) Méthode

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
        public ImportConventionBuilder AsContractName(Func<Type, string> getContractNameFromPartType)
        {
            _getContractNameFromPartType = getContractNameFromPartType ?? throw new ArgumentNullException(nameof(getContractNameFromPartType));
            return this;
        }

Same methods

ImportConventionBuilder::AsContractName ( string contractName ) : ImportConventionBuilder