MXMSConfiguration: Difference between revisions
From MXMS Wiki
Jump to navigationJump to search
| Line 30: | Line 30: | ||
}) | }) | ||
</pre> | </pre> | ||
=== Culture === | |||
MXMS has multi language support. To specify the language, currency and numeric formats specify the culture using this property. The property expects a culture instance. | |||
<pre> | |||
.WithEnvironmentConfiguration(i => | |||
{ | |||
i.Culture = new System.Globalization.CultureInfo("nl-NL"); | |||
}) | |||
</pre> | |||
=== Workingdirectory === | === Workingdirectory === | ||
MXMS stores certain files to the file system. For this MXMS needs a directory within the hosting environment in which the application has full access rights. The default location for this directory is <APPLICATION_ROOT_DIRECTORY>mxms/. This directory name can be overridden using the WorkingDirectory configuration property. The value should be a relative path e.g. "mxms/". Absolute path's are not allowed. | MXMS stores certain files to the file system. For this MXMS needs a directory within the hosting environment in which the application has full access rights. The default location for this directory is <APPLICATION_ROOT_DIRECTORY>mxms/. This directory name can be overridden using the WorkingDirectory configuration property. The value should be a relative path e.g. "mxms/". Absolute path's are not allowed. | ||
Revision as of 07:00, 31 March 2026
An example which injects loads the default configuration and overrides a few settings.
public void ConfigureServices(IServiceCollection services)
{
var mxms = services.AddMXMS(_env, _config)
.WithDefaultConfigurationAndApplication()
.WithEntityStoreConfiguration(i =>
{
i.AutoUpdateDatastore = true;
})
.WithEnvironmentConfiguration(i =>
{
i.Culture = new System.Globalization.CultureInfo("nl-NL");
});
if (_env.IsDevelopment())
{
mxms.EnableDebug();
}
mxms.Build();
}
Environment configuration
.WithEnvironmentConfiguration(i =>
{
// Configuration changes here
})
Culture
MXMS has multi language support. To specify the language, currency and numeric formats specify the culture using this property. The property expects a culture instance.
.WithEnvironmentConfiguration(i =>
{
i.Culture = new System.Globalization.CultureInfo("nl-NL");
})
Workingdirectory
MXMS stores certain files to the file system. For this MXMS needs a directory within the hosting environment in which the application has full access rights. The default location for this directory is <APPLICATION_ROOT_DIRECTORY>mxms/. This directory name can be overridden using the WorkingDirectory configuration property. The value should be a relative path e.g. "mxms/". Absolute path's are not allowed.
.WithEnvironmentConfiguration(i =>
{
i.WorkingDirectory = "mxms/";
})
Logging configuration
.WithLoggingConfiguration(i =>
{
// Configuration changes here
})
Entity store configuration
.WithEntityStoreConfiguration(i =>
{
// Configuration changes here
})
Security configuration
.WithSecurityConfiguration(i =>
{
// Configuration changes here
})
API configuration
.WithAPIConfiguration(i =>
{
// Configuration changes here
})