Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c359061
Copy files from 'runtimes' directory
artem-dudarev Dec 17, 2025
d1f7870
Fix directory creation
artem-dudarev Dec 17, 2025
41c7ea3
Merge branch 'dev' into VCST-4413-runtimes
artem-dudarev Jan 13, 2026
a403ed7
Resolve native libraries
artem-dudarev Dec 19, 2025
260962e
Use thread safe dictionary
artem-dudarev Jan 20, 2026
2c63760
File-scoped namespace
artem-dudarev Jan 21, 2026
1f0a35d
Merge from dev
artem-dudarev Jan 21, 2026
9f30521
Fix tests
artem-dudarev Jan 21, 2026
99d862e
Merge branch 'dev' into VCST-4413-runtimes
artem-dudarev Mar 4, 2026
e6b83c8
Revert debug changes
artem-dudarev Mar 4, 2026
f44fe99
Refactoring
artem-dudarev Mar 4, 2026
2d733fd
VCST-4696: Refactored Platform Modularity Architecture
OlegoO Mar 11, 2026
bf3bc6b
Merge from dev
OlegoO Mar 11, 2026
cb0f03e
fix code review
OlegoO Mar 11, 2026
fefb953
Simplify platform from AppConfiguration and Azure.Messaging.EventGrid…
OlegoO Mar 11, 2026
6fe55ec
Change log level from Information to Debug
OlegoO Mar 11, 2026
adc2ba2
fix module discovery
OlegoO Mar 11, 2026
89ffe85
Fix startupType to support class name with assembly
OlegoO Mar 11, 2026
0896bda
Create logger only once in static method
OlegoO Mar 12, 2026
bbc9003
Update appsettings
OlegoO Mar 16, 2026
9b2a32e
Merge branch 'dev' into feat/VCST-4696-clean-modularity
OlegoO Mar 17, 2026
292a7a3
Remove redundant pragma warning disable VC0014
artem-dudarev Mar 17, 2026
47d3ed0
fix: Resolve issue with Serilog modules on startup
OlegoO Mar 17, 2026
fca34ae
Merge remote-tracking branch 'origin/dev' into feat/VCST-4696-clean-m…
artem-dudarev Mar 18, 2026
817a862
Refactoring
artem-dudarev Mar 18, 2026
c639f7c
feat: Added logger into Module.Copier
OlegoO Mar 18, 2026
9b10d1d
Fix naming, refactoring
artem-dudarev Mar 18, 2026
a90314d
Switch business logic to use new modulatiy. Fix tests.
OlegoO Mar 19, 2026
ca25d92
Merge branch 'dev' into feat/VCST-4696-clean-modularity
OlegoO Mar 19, 2026
c245537
Refactoring
artem-dudarev Mar 19, 2026
257b9ad
Refactoring
artem-dudarev Mar 19, 2026
954424a
Merge branch 'dev' into feat/VCST-4696-clean-modularity
OlegoO Mar 19, 2026
d96c4f5
Fix sonar warnings
OlegoO Mar 19, 2026
696331b
Improve ModuleSequenceBoostOptions initialization for ModuleRunner.
OlegoO Mar 19, 2026
71b2a96
Merge branch 'dev' into feat/VCST-4696-clean-modularity
OlegoO Mar 19, 2026
00eb0ed
Fix duplicated PackageReference
OlegoO Mar 19, 2026
dd3de3f
Improve IPlatformStartup
OlegoO Mar 20, 2026
a150e15
Refactoring
artem-dudarev Mar 20, 2026
c9e2c91
Rename platform Startup and ConfigurePhases
OlegoO Mar 20, 2026
ba8a969
Refactoring
artem-dudarev Mar 20, 2026
5e4a380
Added RebuildProbingFolder on either install or uninstall or if .rebu…
OlegoO Mar 20, 2026
a3fb086
Delete files and sub folders in probing folder instead of delete folder
OlegoO Mar 20, 2026
7640b38
Added IModuleService to returns installed modules sorted by dependenc…
OlegoO Mar 20, 2026
c96950c
Refactoring
artem-dudarev Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,4 @@ app_data/
/src/VirtoCommerce.Platform.DistributedLock/VirtoCommerce.Platform.DistributedLock.xml
/src/VirtoCommerce.Platform.Modules/VirtoCommerce.Platform.Modules.xml
/src/VirtoCommerce.Platform.Security/VirtoCommerce.Platform.Security.xml
/.claude/settings.local.json
637 changes: 637 additions & 0 deletions docs/modularity.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions module.ignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Azure.Core.dll
Azure.Data.AppConfiguration.dll
Azure.Identity.dll
Azure.Messaging.EventGrid.dll
Azure.Messaging.EventGrid.SystemEvents.dll
Azure.Security.KeyVault.Secrets.dll
Dapper.dll
DnsClient.dll
Expand Down Expand Up @@ -31,7 +28,6 @@ Microsoft.AspNetCore.SignalR.Client.Core.dll
Microsoft.AspNetCore.SignalR.Client.dll
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.dll
Microsoft.AspNetCore.SignalR.StackExchangeRedis.dll
Microsoft.Azure.AppConfiguration.AspNetCore.dll
Microsoft.Azure.SignalR.Common.dll
Microsoft.Azure.SignalR.dll
Microsoft.Azure.SignalR.Protocols.dll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
using System.Collections.Generic;
using System.IO;

#pragma warning disable VC0014 // Type is obsolete
namespace VirtoCommerce.Platform.Core.Modularity
{
/// <summary>
/// Loads modules from an arbitrary location on the filesystem. This type loader is only called if
/// <see cref="ModuleInfo"/> classes have a Ref parameter that starts with "file://".
/// Loads modules from an arbitrary location on the filesystem. This type loader is only called if
/// <see cref="ModuleInfo"/> classes have a Ref parameter that starts with "file://".
/// This class is only used on the Desktop version of the Prism Library.
/// </summary>
[Obsolete("Use ModuleAssemblyLoader static class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public class FileModuleTypeLoader : IModuleTypeLoader, IDisposable
{
private const string _fileSchema = "file://";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using System.Reflection;

namespace VirtoCommerce.Platform.Core.Modularity
{
/// <summary>
/// Interface for classes that are responsible for resolving and loading assembly files.
/// Interface for classes that are responsible for resolving and loading assembly files.
/// </summary>
[Obsolete("Use ModuleAssemblyLoader static class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IAssemblyResolver
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System;

namespace VirtoCommerce.Platform.Core.Modularity
{
[Obsolete("Use ModuleDiscovery class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IExternalModuleCatalog : IModuleCatalog
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using Microsoft.AspNetCore.Builder;

namespace VirtoCommerce.Platform.Core.Modularity
{
/// <summary>
/// Declares a service which initializes the modules into the application.
/// </summary>
[Obsolete("Use ModuleRunner static class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IModuleInitializer
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace VirtoCommerce.Platform.Core.Modularity
{
[Obsolete("Use ModulePackageInstaller and ModuleDiscovery classes instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IModuleInstaller
{
void Install(IEnumerable<ManifestModuleInfo> modules, IProgress<ProgressMessage> progress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace VirtoCommerce.Platform.Core.Modularity
/// <summary>
/// Defines the interface for the service that will retrieve and initialize the application's modules.
/// </summary>
[Obsolete("Use ModuleRunner static class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IModuleManager
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace VirtoCommerce.Platform.Core.Modularity
/// <summary>
/// Defines the interface for moduleTypeLoaders
/// </summary>
[Obsolete("Use ModuleAssemblyLoader static class instead.", DiagnosticId = "VC0014", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions")]
public interface IModuleTypeLoader
{
/// <summary>
Expand Down
47 changes: 47 additions & 0 deletions src/VirtoCommerce.Platform.Core/Modularity/IPlatformStartup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace VirtoCommerce.Platform.Core.Modularity;

/// <summary>
/// Allows modules to participate in platform startup phases before the standard IModule lifecycle.
/// Implementations are discovered via the startupType element in module.manifest.
/// </summary>
public interface IPlatformStartup
{
/// <summary>
/// Execution priority. Lower values run first.
/// Use <see cref="StartupPriority"/> constants.
/// </summary>
int Priority => StartupPriority.Default;

/// <summary>
/// Determines when <see cref="Configure"/> is called in the pipeline.
/// </summary>
PipelinePhase Phase => PipelinePhase.Initialization;

/// <summary>
/// Called during Program.cs ConfigureAppConfiguration phase.
/// Use to add configuration sources (e.g., Azure App Configuration).
/// </summary>
void ConfigureAppConfiguration(IConfigurationBuilder builder, IHostEnvironment env) { }

/// <summary>
/// Called during Program.cs ConfigureServices phase.
/// Use to register host-level services.
/// </summary>
void ConfigureHostServices(IServiceCollection services, IConfiguration config) { }

/// <summary>
/// Called during Startup.ConfigureServices after modules are loaded.
/// Use for application-level service registration.
/// </summary>
void ConfigureServices(IServiceCollection services, IConfiguration config) { }

/// <summary>
/// Called during Startup.Configure at the position determined by <see cref="Phase"/>.
/// </summary>
void Configure(IApplicationBuilder app, IConfiguration config) { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public ManifestModuleInfo()

public ICollection<ManifestAppInfo> Apps { get; } = new List<ManifestAppInfo>();

public string StartupType { get; set; }

public virtual ManifestModuleInfo LoadFromManifest(ModuleManifest manifest)
{
if (manifest == null)
Expand Down Expand Up @@ -93,6 +95,7 @@ public virtual ManifestModuleInfo LoadFromManifest(ModuleManifest manifest)
Tags = manifest.Tags;
Identity = new ModuleIdentity(Id, Version, Optional);
ModuleType = manifest.ModuleType;
StartupType = manifest.StartupType;

if (manifest.Groups != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void Load()
/// <summary>
/// Reload catalog
/// </summary>
public void Reload()
public virtual void Reload()
{
this.isLoaded = false;
this.Items.Clear();
Expand Down
3 changes: 3 additions & 0 deletions src/VirtoCommerce.Platform.Core/Modularity/ModuleManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public class ModuleManifest
[XmlElement("moduleType")]
public string ModuleType { get; set; }

[XmlElement("startupType")]
public string StartupType { get; set; }

[XmlArray("dependencies")]
[XmlArrayItem("dependency")]
public ManifestDependency[] Dependencies { get; set; }
Expand Down
25 changes: 25 additions & 0 deletions src/VirtoCommerce.Platform.Core/Modularity/PipelinePhase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace VirtoCommerce.Platform.Core.Modularity;

/// <summary>
/// Determines when IPlatformStartup.Configure() is called in the middleware pipeline.
/// </summary>
public enum PipelinePhase
{
/// <summary>
/// Before routing and authentication middleware.
/// For configuration refresh, custom request preprocessing.
/// </summary>
EarlyMiddleware = 0,

/// <summary>
/// Within ExecuteSynchronized block, after platform migrations but before IModule.PostInitialize.
/// For infrastructure requiring database readiness (e.g., Hangfire).
/// </summary>
Initialization = 1,

/// <summary>
/// After endpoints are mapped and modules are post-initialized.
/// For middleware needing all endpoints visible (e.g., Swagger).
/// </summary>
LateMiddleware = 2
}
20 changes: 20 additions & 0 deletions src/VirtoCommerce.Platform.Core/Modularity/StartupPriority.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace VirtoCommerce.Platform.Core.Modularity;

/// <summary>
/// Well-known priority constants for IPlatformStartup ordering.
/// Lower values execute first.
/// </summary>
public static class StartupPriority
{
/// <summary>Configuration sources load first.</summary>
public const int ConfigurationSource = -1000;

/// <summary>Infrastructure services like logging and caching.</summary>
public const int Infrastructure = -500;

/// <summary>Default priority for module startup types.</summary>
public const int Default = 0;

/// <summary>Services depending on other modules.</summary>
public const int Late = 500;
}
Loading
Loading