AssemblyDiscoveryHelperGetAssemblies Method |
Returns an enumerable collection of application assemblies.
Namespace: CMS.CoreAssembly: CMS.Core (in CMS.Core.dll) Version: 12.0.0
Syntax public static IEnumerable<Assembly> GetAssemblies(
bool discoverableOnly
)
Parameters
- discoverableOnly
- Type: SystemBoolean
A value indicating whether the discovery process will locate only assemblies decorated with the AssemblyDiscoverableAttribute attribute.
Return Value
Type:
IEnumerableAssemblyAn enumerable collection of application assemblies.
Remarks
The discovery process looks for assemblies in the directories that the assembly resolver probes.
By default, all the application assemblies are returned, but there are exceptions.
- If the discoverableOnly is set to true, assemblies without the AssemblyDiscoverableAttribute attribute are excluded from discovery.
- If there is a file with the "exclude" extension, for example MyCustomAssembly.dll.exclude, the MyCustomAssembly.dll is excluded from discovery.
- Assemblies from the GAC are always excluded from discovery.
See Also