Skip to content

Commit a96f711

Browse files
author
vp
committed
2 parents b064169 + 6e7cda5 commit a96f711

4 files changed

Lines changed: 26 additions & 50 deletions

File tree

docs/features-pipelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ flowchart TD
189189
A[Developer] --> B{How to define pipeline?}
190190
B -->|Reusable feature workflow| C[PipelineDefinition<TContext>]
191191
B -->|Programmatic definition| D[PipelineDefinitionBuilder<TContext>]
192-
B -->|Small local workflow| E[services.AddPipelines().WithPipeline(...)]
192+
B -->|Small local workflow| E[services.AddPipelines.WithPipeline]
193193
194194
C --> F[Register packaged pipeline]
195195
D --> G[Build IPipelineDefinition]

docs/features-storage-files.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Managing file storage presents challenges due to inconsistent APIs across storag
1010

1111
The `FileStorage` feature addresses these through the `IFileStorageProvider` interface for abstracting file operations, a fluent DI setup with `AddFileStorage`, and the `Result` pattern for error handling and messaging. It supports progress reporting via `IProgress<FileProgress>` and metadata management with `FileMetadata`. The feature is designed to be extensible, allowing developers to implement custom providers or extend functionality with behaviors. Additionally, it supports notifications for real-time monitoring (used by `FileMonitoring`) through the `SupportsNotifications` property. Besides the existing `WriteFileAsync` push model, the abstraction also supports `OpenWriteFileAsync` for scenarios where callers want to stream bytes directly into the destination.
1212

13+
Available providers included:
14+
- Local Files (e.g., `C:\data\file.txt` or `/var/data/file.txt`)
15+
- Network Shares (e.g., Windows UNC paths)
16+
- Azure Files
17+
- Azure Blob Storage
18+
1319
### Architecture
1420

1521
The `FileStorage` subsystem is built around the `IFileStorageProvider` interface, which defines core file operations. Providers like `LocalFileStorageProvider`, `InMemoryFileStorageProvider`, and others implement this interface. The `IFileStorageFactory` resolves providers by name, and extensions like `FileStorageProviderCompressionExtensions` and `FileStorageProviderCrossExtensions` add advanced functionality such as compression and cross-provider operations. Behaviors can be applied to providers to add cross-cutting concerns like logging or retry logic.

src/Common.Utilities/Validation/ValidationCodeGenAttributes.cs

Lines changed: 19 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,32 @@ namespace BridgingIT.DevKit.Common;
1010
/// <summary>
1111
/// Provides the optional error message shared by source-generated validation attributes.
1212
/// </summary>
13-
public abstract class ValidationCodeGenAttribute : Attribute
13+
/// <remarks>
14+
/// Initializes a new instance of the <see cref="ValidationCodeGenAttribute"/> class.
15+
/// </remarks>
16+
/// <param name="message">The optional custom validation message.</param>
17+
public abstract class ValidationCodeGenAttribute(string message = null) : Attribute
1418
{
15-
/// <summary>
16-
/// Initializes a new instance of the <see cref="ValidationCodeGenAttribute"/> class.
17-
/// </summary>
18-
/// <param name="message">The optional custom validation message.</param>
19-
protected ValidationCodeGenAttribute(string message = null)
20-
{
21-
this.Message = message;
22-
}
23-
2419
/// <summary>
2520
/// Gets the optional custom validation message.
2621
/// </summary>
27-
public string Message { get; }
22+
public string Message { get; } = message;
2823
}
2924

3025
/// <summary>
3126
/// Provides a shared string-backed comparison value for source-generated validation attributes.
3227
/// </summary>
33-
public abstract class SingleValueValidationCodeGenAttribute : ValidationCodeGenAttribute
28+
/// <remarks>
29+
/// Initializes a new instance of the <see cref="SingleValueValidationCodeGenAttribute"/> class.
30+
/// </remarks>
31+
/// <param name="value">The invariant string comparison value.</param>
32+
/// <param name="message">The optional custom validation message.</param>
33+
public abstract class SingleValueValidationCodeGenAttribute(string value, string message = null) : ValidationCodeGenAttribute(message)
3434
{
35-
/// <summary>
36-
/// Initializes a new instance of the <see cref="SingleValueValidationCodeGenAttribute"/> class.
37-
/// </summary>
38-
/// <param name="value">The invariant string comparison value.</param>
39-
/// <param name="message">The optional custom validation message.</param>
40-
protected SingleValueValidationCodeGenAttribute(string value, string message = null)
41-
: base(message)
42-
{
43-
this.Value = value;
44-
}
45-
4635
/// <summary>
4736
/// Gets the invariant string comparison value.
4837
/// </summary>
49-
public string Value { get; }
38+
public string Value { get; } = value;
5039

5140
/// <summary>
5241
/// Formats a numeric attribute argument using invariant culture.
@@ -183,21 +172,15 @@ public sealed class ValidateMinLengthAttribute : ValidationCodeGenAttribute
183172
/// Initializes a new instance of the <see cref="ValidateMinLengthAttribute"/> class.
184173
/// </summary>
185174
/// <param name="length">The inclusive minimum length.</param>
186-
public ValidateMinLengthAttribute(int length)
187-
{
188-
this.Length = length;
189-
}
175+
public ValidateMinLengthAttribute(int length) => this.Length = length;
190176

191177
/// <summary>
192178
/// Initializes a new instance of the <see cref="ValidateMinLengthAttribute"/> class.
193179
/// </summary>
194180
/// <param name="length">The inclusive minimum length.</param>
195181
/// <param name="message">The optional custom validation message.</param>
196182
public ValidateMinLengthAttribute(int length, string message)
197-
: base(message)
198-
{
199-
this.Length = length;
200-
}
183+
: base(message) => this.Length = length;
201184

202185
/// <summary>
203186
/// Gets the inclusive minimum length.
@@ -215,21 +198,15 @@ public sealed class ValidateMaxLengthAttribute : ValidationCodeGenAttribute
215198
/// Initializes a new instance of the <see cref="ValidateMaxLengthAttribute"/> class.
216199
/// </summary>
217200
/// <param name="length">The inclusive maximum length.</param>
218-
public ValidateMaxLengthAttribute(int length)
219-
{
220-
this.Length = length;
221-
}
201+
public ValidateMaxLengthAttribute(int length) => this.Length = length;
222202

223203
/// <summary>
224204
/// Initializes a new instance of the <see cref="ValidateMaxLengthAttribute"/> class.
225205
/// </summary>
226206
/// <param name="length">The inclusive maximum length.</param>
227207
/// <param name="message">The optional custom validation message.</param>
228208
public ValidateMaxLengthAttribute(int length, string message)
229-
: base(message)
230-
{
231-
this.Length = length;
232-
}
209+
: base(message) => this.Length = length;
233210

234211
/// <summary>
235212
/// Gets the inclusive maximum length.
@@ -587,16 +564,10 @@ public ValidateEmailAttribute(string message) : base(message) { }
587564
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
588565
public sealed class ValidateMatchesAttribute : ValidationCodeGenAttribute
589566
{
590-
public ValidateMatchesAttribute(string pattern)
591-
{
592-
this.Pattern = pattern;
593-
}
567+
public ValidateMatchesAttribute(string pattern) => this.Pattern = pattern;
594568

595569
public ValidateMatchesAttribute(string pattern, string message)
596-
: base(message)
597-
{
598-
this.Pattern = pattern;
599-
}
570+
: base(message) => this.Pattern = pattern;
600571

601572
/// <summary>
602573
/// Gets the regex pattern.

src/Domain/Model/AggregateRootId.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace BridgingIT.DevKit.Domain.Model;
77

88
using System.Diagnostics;
99

10-
1110
[DebuggerDisplay("{Value}")]
1211
public abstract class AggregateRootId<TId> : EntityId<TId> // TODO: this is obsolete with the new codegen TypedIds, remove in future (DinnerFiesta depends on it for now)
1312
{

0 commit comments

Comments
 (0)