33 references to ExportServices
System.ComponentModel.Composition (33)
System\ComponentModel\Composition\ExportServices.cs (13)
19
private static readonly MethodInfo _createStronglyTypedLazyOfTM = typeof(
ExportServices
).GetMethod("CreateStronglyTypedLazyOfTM", BindingFlags.NonPublic | BindingFlags.Static)!;
20
private static readonly MethodInfo _createStronglyTypedLazyOfT = typeof(
ExportServices
).GetMethod("CreateStronglyTypedLazyOfT", BindingFlags.NonPublic | BindingFlags.Static)!;
21
private static readonly MethodInfo _createSemiStronglyTypedLazy = typeof(
ExportServices
).GetMethod("CreateSemiStronglyTypedLazy", BindingFlags.NonPublic | BindingFlags.Static)!;
52
genericMethod = _createStronglyTypedLazyOfTM.MakeGenericMethod(exportType ??
ExportServices
.DefaultExportedValueType, metadataViewType);
56
genericMethod = _createStronglyTypedLazyOfT.MakeGenericMethod(exportType ??
ExportServices
.DefaultExportedValueType);
70
exportType ??
ExportServices
.DefaultExportedValueType,
71
metadataViewType ??
ExportServices
.DefaultMetadataViewType);
84
() =>
ExportServices
.GetCastedExportedValue<T>(export),
92
() =>
ExportServices
.GetCastedExportedValue<T>(export),
103
() =>
ExportServices
.GetCastedExportedValue<T>(export),
109
return new Lazy<T>(() =>
ExportServices
.GetCastedExportedValue<T>(export), LazyThreadSafetyMode.PublicationOnly);
118
() =>
ExportServices
.GetCastedExportedValue<T>(export),
126
() =>
ExportServices
.GetCastedExportedValue<T>(export),
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
472
ExportServices
.IsDefaultMetadataViewType(metadataViewType) ||
473
ExportServices
.IsDictionaryConstructorViewType(metadataViewType) ||
System\ComponentModel\Composition\Hosting\ExportProvider.cs (1)
214
var checkResult =
ExportServices
.CheckCardinality(definition, exports);
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (8)
266
Func<Export, Lazy<object, object>> typedExportFactory =
ExportServices
.CreateSemiStronglyTypedLazyFactory(type, metadataViewType);
718
result.Add(
ExportServices
.GetCastedExportedValue<T>(export));
732
return (export != null) ?
ExportServices
.GetCastedExportedValue<T>(export) : default;
742
result.Add(
ExportServices
.CreateStronglyTypedLazyOfT<T>(export));
754
result.Add(
ExportServices
.CreateStronglyTypedLazyOfTM<T, TMetadataView>(export));
763
return (export != null) ?
ExportServices
.CreateStronglyTypedLazyOfTM<T, TMetadataView>(export) : null;
770
return (export != null) ?
ExportServices
.CreateStronglyTypedLazyOfT<T>(export) : null;
783
metadataViewType ??=
ExportServices
.DefaultMetadataViewType;
System\ComponentModel\Composition\MetadataViewProvider.cs (2)
131
if (
ExportServices
.IsDefaultMetadataViewType(metadataViewType) ||
133
ExportServices
.IsDictionaryConstructorViewType(metadataViewType))
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.LifetimeContext.cs (4)
24
exportedValue =
ExportServices
.GetCastedExportedValue<T>(exportProduct);
33
exportedValue =
ExportServices
.GetCastedExportedValue<T>(exportProduct);
39
var factoryPartDefinition =
ExportServices
.GetCastedExportedValue<ComposablePartDefinition>(export);
43
exportedValue =
ExportServices
.CastExportedValue<T>(part.ToElement(), part.GetExportedValue(exportDef));
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (2)
171
castFunction =
ExportServices
.CreateStronglyTypedLazyFactory(arguments[0].UnderlyingSystemType, null);
180
castFunction =
ExportServices
.CreateStronglyTypedLazyFactory(arguments[0].UnderlyingSystemType, arguments[1].UnderlyingSystemType);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
396
ExportCardinalityCheckResult result =
ExportServices
.CheckCardinality(definition, exports);