ApplicationPartsTypeSource class
namespace: Serenity.Web assembly: Serenity.Net.Web
Implementation of a type source that uses ApplicationPartManager to get assemblies. Note that it only includes assemblies that are marked with TypeSourceAssemblyAttribute, which is automatically added to assemblies that reference the Serenity.Net.Web NuGet package (or Serenity.Net.Web.targets).
public class ApplicationPartsTypeSource : BaseAssemblyTypeSource
Public Members
| name | description |
|---|---|
| ApplicationPartsTypeSource(…) | Implementation of a type source that uses ApplicationPartManager to get assemblies. Note that it only includes assemblies that are marked with TypeSourceAssemblyAttribute, which is automatically added to assemblies that reference the Serenity.Net.Web NuGet package (or Serenity.Net.Web.targets). |
| readonly PartManager | Gets the application part manager. |
| override GetAssemblies() |
Protected Members
| name | description |
|---|---|
| virtual EnsureApplicationParts() | Tries to recover application parts when the generated application parts assembly info (e.g. *.MvcApplicationPartsAssemblyInfo.cs) was not included in the build. In that case the ApplicationPartManager only contains the entry assembly, which makes pages and navigation items from referenced assemblies disappear. This reads the application deps file, finds the assemblies that reference MVC and adds them to the part manager, just like the Razor SDK would have done at build time. It is only attempted once, and only when the entry assembly has no ApplicationPartAttribute at all and this assembly (Serenity.Net.Web) is missing from the part manager. Concurrent callers block until the recovery completes. |
| virtual GetApplicationPartAssemblies() | Gets all the assemblies from the application part manager. |
| virtual GetImplicitAssemblies() | Gets the set of implicitly included assemblies, by default from Serenity.Net.Core to Serenity.Net.Web. |
| virtual IsTypeSourceAssembly(…) | Returns true for assemblies that are marked with TypeSourceAssemblyAttribute. |
| virtual TopologicalSort(…) | Sorts assemblies by dependency order. |
See Also
- class BaseAssemblyTypeSource
- Source: ApplicationPartsTypeSource.cs