19 references to ExportCardinalityCheckResult
System.ComponentModel.Composition (19)
System\ComponentModel\Composition\ExportServices.cs (5)
151
internal static
ExportCardinalityCheckResult
CheckCardinality<T>(ImportDefinition definition, IEnumerable<T>? enumerable)
158
private static
ExportCardinalityCheckResult
MatchCardinality(EnumerableCardinality actualCardinality, ImportCardinality importCardinality)
165
return
ExportCardinalityCheckResult
.NoExports;
172
return
ExportCardinalityCheckResult
.TooManyExports;
185
return
ExportCardinalityCheckResult
.Match;
System\ComponentModel\Composition\Hosting\ExportProvider.cs (10)
101
ExportCardinalityCheckResult
result = TryGetExportsCore(definition, atomicComposition, out IEnumerable<Export>? exports);
104
case
ExportCardinalityCheckResult
.Match:
107
case
ExportCardinalityCheckResult
.NoExports:
110
if (result !=
ExportCardinalityCheckResult
.TooManyExports)
148
ExportCardinalityCheckResult
result = TryGetExportsCore(definition, atomicComposition, out exports);
149
return (result ==
ExportCardinalityCheckResult
.Match);
208
private
ExportCardinalityCheckResult
TryGetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition, out IEnumerable<Export>? exports)
214
var
checkResult = ExportServices.CheckCardinality(definition, exports);
220
if (checkResult ==
ExportCardinalityCheckResult
.TooManyExports &&
223
checkResult =
ExportCardinalityCheckResult
.Match;
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (4)
396
ExportCardinalityCheckResult
result = ExportServices.CheckCardinality(definition, exports);
400
case
ExportCardinalityCheckResult
.NoExports:
403
case
ExportCardinalityCheckResult
.TooManyExports:
407
if (result !=
ExportCardinalityCheckResult
.Match)