22 references to ExactlyOne
System.ComponentModel.Composition (22)
System\ComponentModel\Composition\ExportServices.cs (1)
163
if (importCardinality == ImportCardinality.
ExactlyOne
)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
606
/// <see cref="ImportCardinality.
ExactlyOne
"/>.
610
return cardinality == ImportCardinality.ZeroOrOne || cardinality == ImportCardinality.
ExactlyOne
;
System\ComponentModel\Composition\Hosting\ExportProvider.cs (6)
52
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.
ExactlyOne
"/> and
59
/// <see cref="ImportCardinality.
ExactlyOne
"/> and there are more than one <see cref="Export"/>
86
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.
ExactlyOne
"/> and
93
/// <see cref="ImportCardinality.
ExactlyOne
"/> and there are more than one <see cref="Export"/>
137
/// <see cref="ImportCardinality.
ExactlyOne
"/> and there is exactly one <see cref="Export"/>
169
/// if <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.
ExactlyOne
"/>
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (3)
528
return GetExportedValueCore<T>(contractName, ImportCardinality.
ExactlyOne
);
761
Export? export = GetExportsCore(typeof(T), typeof(TMetadataView), contractName, ImportCardinality.
ExactlyOne
).SingleOrDefault();
768
Export? export = GetExportsCore(typeof(T), null, contractName, ImportCardinality.
ExactlyOne
).SingleOrDefault();
System\ComponentModel\Composition\Hosting\FilteredCatalog.Traversal.cs (2)
19
return IncludeDependencies(i => i.Cardinality == ImportCardinality.
ExactlyOne
);
42
return IncludeDependents(i => i.Cardinality == ImportCardinality.
ExactlyOne
);
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
761
return import.Cardinality == ImportCardinality.
ExactlyOne
;
System\ComponentModel\Composition\ImportAttribute.cs (1)
190
return ImportCardinality.
ExactlyOne
;
System\ComponentModel\Composition\Primitives\ComposablePart.cs (2)
188
/// <see cref="ImportCardinality.
ExactlyOne
"/>.
194
/// <see cref="ImportCardinality.
ExactlyOne
"/>.
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (3)
20
private readonly ImportCardinality _cardinality = ImportCardinality.
ExactlyOne
;
100
(cardinality != ImportCardinality.
ExactlyOne
) &&
176
/// <see cref="ImportCardinality.
ExactlyOne
"/>
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
488
if (definition.Cardinality == ImportCardinality.
ExactlyOne
)