Releases: VirtoCommerce/vc-module-core
3.803.0
🎯 Development
- Refactored Unique Number Generator
Added a new implementation for IUniqueNumberGenerator. Class SequenceNumberGeneratorService has been enhanced to support dynamic counter options within the number template. It supports sequence number generator for multi-instance configuration and fixes some issues.
Note: If you use IUniqueNumberGenerator, the new implementation has 100% compatibility with current templates.
Also, it allows users to define reset counter types: None, Daily, Weekly, Monthly, Yearly, start counter from a specific value, and set counter increment, all within the number template itself. Additionally, this feature includes improvements in error handling, retry policies for database operations, and code organization for better maintainability.
New Features
- Template Options: Users can now specify counter options directly within the number template using the format <number_template>@<reset_counter_type>:<start_counter_from>:<counter_increment>. The default value are: Daily for reset_counter_type, 1 for start_counter_from and 1 counter_increment.
- Reset Counter Types: Users can choose from None, Daily, Weekly, Monthly, and Yearly reset counter types to tailor the behaviour of the counter.
- Enhanced Retry Policy: The retry policy for database operations has been refined, providing better handling of concurrency-related exceptions. Default value is: 15.
- Improved Error Handling: The code now includes robust error handling to catch and handle relevant exceptions during database operations.
Template Examples
- Basic template:
PO{1:D5}
- Daily template:
PO{0:yyMMdd}-{1:D5}
orPO{0:yyMMdd}-{1:D5}@Daily
- Weekly reset, starting from 1, with a counter increment of 10:
PO{0:yyMMdd}-{1:D5}@Weekly:1:10
- No reset, starting from 1, with a counter increment of 1:
PO{0:yyMMdd}-{1:D5}@None:1:1
Where:
- {0} - date time in UTC format.
- {1} - the counter.
- {2} - tenantId or empty.
The implementation uses String.Format method to convert the value of objects to strings based on the formats specified. If you are new to the String.Format method, see the Get started with the String.Format method section for a quick overview.
New Interfaces and Options
-
ITenantUniqueNumberGenerator interface: This interface extends the capabilities of IUniqueNumberGenerator for tenant-specific unique number generation. It allows users to provide a tenant ID along with the number template and counter options.
-
CounterOptions class: Represents options for counter generation. Users can set the reset counter type, starting counter value, and counter increment.
-
SequenceNumberGeneratorOptions class: Represents options specific to the sequence number generator. It defines the number of retries and the delay between retries in case of concurrency-related exceptions. These options are bound to the configuration key "VirtoCommerce:SequenceNumberGenerator."
...
{
"VirtoCommerce": {
...
"SequenceNumberGenerator": {
"RetryCount": 15,
"RetryDelay": 5
}
}
...
}
How to Use
To utilize the new features, simply update your number template to include the desired counter options. The enhanced IUniqueNumberGenerator will automatically parse and apply these options during number generation. For tenant-specific scenarios, implement the ITenantUniqueNumberGenerator interface.
Screenshots
3.800.2
🎯 Development
- Refactored Unique Number Generator
Added a new implementation for IUniqueNumberGenerator. Class SequenceNumberGeneratorService has been enhanced to support dynamic counter options within the number template. It supports sequence number generator for multi-instance configuration and fixes some issues.
Note: If you use IUniqueNumberGenerator, the new implementation has 100% compatibility with current templates.
Also, it allows users to define reset counter types: None, Daily, Weekly, Monthly, Yearly, start counter from a specific value, and set counter increment, all within the number template itself. Additionally, this feature includes improvements in error handling, retry policies for database operations, and code organization for better maintainability.
New Features
- Template Options: Users can now specify counter options directly within the number template using the format <number_template>@<reset_counter_type>:<start_counter_from>:<counter_increment>. The default value are: Daily for reset_counter_type, 1 for start_counter_from and 1 counter_increment.
- Reset Counter Types: Users can choose from None, Daily, Weekly, Monthly, and Yearly reset counter types to tailor the behaviour of the counter.
- Enhanced Retry Policy: The retry policy for database operations has been refined, providing better handling of concurrency-related exceptions. Default value is: 15.
- Improved Error Handling: The code now includes robust error handling to catch and handle relevant exceptions during database operations.
Template Examples
- Basic template:
PO{1:D5}
- Daily template:
PO{0:yyMMdd}-{1:D5}
orPO{0:yyMMdd}-{1:D5}@Daily
- Weekly reset, starting from 1, with a counter increment of 10:
PO{0:yyMMdd}-{1:D5}@Weekly:1:10
- No reset, starting from 1, with a counter increment of 1:
PO{0:yyMMdd}-{1:D5}@None:1:1
Where:
- {0} - date time in UTC format.
- {1} - the counter.
- {2} - tenantId or empty.
The implementation uses String.Format method to convert the value of objects to strings based on the formats specified. If you are new to the String.Format method, see the Get started with the String.Format method section for a quick overview.
New Interfaces and Options
-
ITenantUniqueNumberGenerator interface: This interface extends the capabilities of IUniqueNumberGenerator for tenant-specific unique number generation. It allows users to provide a tenant ID along with the number template and counter options.
-
CounterOptions class: Represents options for counter generation. Users can set the reset counter type, starting counter value, and counter increment.
-
SequenceNumberGeneratorOptions class: Represents options specific to the sequence number generator. It defines the number of retries and the delay between retries in case of concurrency-related exceptions. These options are bound to the configuration key "VirtoCommerce:SequenceNumberGenerator."
...
{
"VirtoCommerce": {
...
"SequenceNumberGenerator": {
"RetryCount": 15,
"RetryDelay": 5
}
}
...
}
How to Use
To utilize the new features, simply update your number template to include the desired counter options. The enhanced IUniqueNumberGenerator will automatically parse and apply these options during number generation. For tenant-specific scenarios, implement the ITenantUniqueNumberGenerator interface.
Screenshots
3.404.2
🎯 Development
- Refactored Unique Number Generator
Added a new implementation for IUniqueNumberGenerator. Class SequenceNumberGeneratorService has been enhanced to support dynamic counter options within the number template. It supports sequence number generator for multi-instance configuration and fixes some issues.
Note: If you use IUniqueNumberGenerator, the new implementation has 100% compatibility with current templates.
Also, it allows users to define reset counter types: None, Daily, Weekly, Monthly, Yearly, start counter from a specific value, and set counter increment, all within the number template itself. Additionally, this feature includes improvements in error handling, retry policies for database operations, and code organization for better maintainability.
New Features
- Template Options: Users can now specify counter options directly within the number template using the format <number_template>@<reset_counter_type>:<start_counter_from>:<counter_increment>. The default value are: Daily for reset_counter_type, 1 for start_counter_from and 1 counter_increment.
- Reset Counter Types: Users can choose from None, Daily, Weekly, Monthly, and Yearly reset counter types to tailor the behaviour of the counter.
- Enhanced Retry Policy: The retry policy for database operations has been refined, providing better handling of concurrency-related exceptions. Default value is: 15.
- Improved Error Handling: The code now includes robust error handling to catch and handle relevant exceptions during database operations.
Template Examples
- Basic template:
PO{1:D5}
- Daily template:
PO{0:yyMMdd}-{1:D5}
orPO{0:yyMMdd}-{1:D5}@Daily
- Weekly reset, starting from 1, with a counter increment of 10:
PO{0:yyMMdd}-{1:D5}@Weekly:1:10
- No reset, starting from 1, with a counter increment of 1:
PO{0:yyMMdd}-{1:D5}@None:1:1
Where:
- {0} - date time in UTC format.
- {1} - the counter.
- {2} - tenantId or empty.
The implementation uses String.Format method to convert the value of objects to strings based on the formats specified. If you are new to the String.Format method, see the Get started with the String.Format method section for a quick overview.
New Interfaces and Options
-
ITenantUniqueNumberGenerator interface: This interface extends the capabilities of IUniqueNumberGenerator for tenant-specific unique number generation. It allows users to provide a tenant ID along with the number template and counter options.
-
CounterOptions class: Represents options for counter generation. Users can set the reset counter type, starting counter value, and counter increment.
-
SequenceNumberGeneratorOptions class: Represents options specific to the sequence number generator. It defines the number of retries and the delay between retries in case of concurrency-related exceptions. These options are bound to the configuration key "VirtoCommerce:SequenceNumberGenerator."
...
{
"VirtoCommerce": {
...
"SequenceNumberGenerator": {
"RetryCount": 15,
"RetryDelay": 5
}
}
...
}
How to Use
To utilize the new features, simply update your number template to include the desired counter options. The enhanced IUniqueNumberGenerator will automatically parse and apply these options during number generation. For tenant-specific scenarios, implement the ITenantUniqueNumberGenerator interface.
Screenshots
3.400.4
🎯 Development
- (Refactored Unique Number Generator)
🐞 Bug fixes
- (Broken submenu in options menu)
- The type or namespace name 'DbContextWithTriggers' could not be found
🎯 Development
- Refactored Unique Number Generator
Added a new implementation for IUniqueNumberGenerator. Class SequenceNumberGeneratorService has been enhanced to support dynamic counter options within the number template. It supports sequence number generator for multi-instance configuration and fixes some issues.
Note: If you use IUniqueNumberGenerator, the new implementation has 100% compatibility with current templates.
Also, it allows users to define reset counter types: None, Daily, Weekly, Monthly, Yearly, start counter from a specific value, and set counter increment, all within the number template itself. Additionally, this feature includes improvements in error handling, retry policies for database operations, and code organization for better maintainability.
New Features
- Template Options: Users can now specify counter options directly within the number template using the format <number_template>@<reset_counter_type>:<start_counter_from>:<counter_increment>. The default value are: Daily for reset_counter_type, 1 for start_counter_from and 1 counter_increment.
- Reset Counter Types: Users can choose from None, Daily, Weekly, Monthly, and Yearly reset counter types to tailor the behaviour of the counter.
- Enhanced Retry Policy: The retry policy for database operations has been refined, providing better handling of concurrency-related exceptions. Default value is: 15.
- Improved Error Handling: The code now includes robust error handling to catch and handle relevant exceptions during database operations.
Template Examples
- Basic template:
PO{1:D5}
- Daily template:
PO{0:yyMMdd}-{1:D5}
orPO{0:yyMMdd}-{1:D5}@Daily
- Weekly reset, starting from 1, with a counter increment of 10:
PO{0:yyMMdd}-{1:D5}@Weekly:1:10
- No reset, starting from 1, with a counter increment of 1:
PO{0:yyMMdd}-{1:D5}@None:1:1
Where:
- {0} - date time in UTC format.
- {1} - the counter.
- {2} - tenantId or empty.
The implementation uses String.Format method to convert the value of objects to strings based on the formats specified. If you are new to the String.Format method, see the Get started with the String.Format method section for a quick overview.
New Interfaces and Options
-
ITenantUniqueNumberGenerator interface: This interface extends the capabilities of IUniqueNumberGenerator for tenant-specific unique number generation. It allows users to provide a tenant ID along with the number template and counter options.
-
CounterOptions class: Represents options for counter generation. Users can set the reset counter type, starting counter value, and counter increment.
-
SequenceNumberGeneratorOptions class: Represents options specific to the sequence number generator. It defines the number of retries and the delay between retries in case of concurrency-related exceptions. These options are bound to the configuration key "VirtoCommerce:SequenceNumberGenerator."
...
{
"VirtoCommerce": {
...
"SequenceNumberGenerator": {
"RetryCount": 15,
"RetryDelay": 5
}
}
...
}
How to Use
To utilize the new features, simply update your number template to include the desired counter options. The enhanced IUniqueNumberGenerator will automatically parse and apply these options during number generation. For tenant-specific scenarios, implement the ITenantUniqueNumberGenerator interface.
Screenshots
3.802.0
3.801.0
3.800.1
🐞 Bug fixes
- (Currency fail to show up on frontend. User can see N/A instead of currency symbol. Custom formatting can be any valid standard numeric format specifier, as well as any combination of custom numeric format specifiers,)
3.800.0
3.404.1
🐞 Bug fixes
- (Currency fail to show up on frontend. User can see N/A instead of currency symbol. Custom formatting can be any valid standard numeric format specifier, as well as any combination of custom numeric format specifiers,)