MetadataProvider.UseAssemblyFactory Method

Namespace
Kampute.DocToolkit.Metadata
Assembly
  • Kampute.DocToolkit.dll

Definition

Uses a custom factory for creating assembly metadata objects.
public static void UseAssemblyFactory(Func<Assembly, IAssembly> factory)

Parameters

factory Func<Assembly, IAssembly>
The factory function to create assembly metadata objects.

Exceptions

ArgumentNullException
Thrown when factory is null.

Remarks

This method replaces the default factory used to create IAssembly instances for assemblies. It allows for custom implementations of assembly metadata, such as for testing or specialized scenarios.

The change affects only assemblies for which metadata has not yet been created. Existing cached metadata remains unchanged. If this is not the intended behavior, consider clearing the cache using MetadataProvider.ClearCache() before setting a new factory.