Skip to content

Commit f3988c4

Browse files
committed
Temp with many unconfirmed changes
1 parent 1da243f commit f3988c4

File tree

108 files changed

+1324
-522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1324
-522
lines changed

.vs/KSFramework/xs/UserPrefs.xml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
<Properties>
2-
<MonoDevelop.Ide.Workbench ActiveDocument="src/KSFramework/Api/ApiResult.cs">
3-
<Files>
4-
<File FileName="src/KSFramework/Api/ApiResult.cs" Line="1" Column="1" />
5-
</Files>
2+
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
3+
<MonoDevelop.Ide.Workbench>
64
<Pads>
75
<Pad Id="ProjectPad">
86
<State name="__root__">
9-
<Node name="KSFramework" expanded="True">
10-
<Node name="src" expanded="True">
11-
<Node name="KSFramework" expanded="True">
12-
<Node name="Dependencies" expanded="True">
13-
<Node name="PackageDependencies" expanded="True" />
14-
</Node>
15-
<Node name="Api" expanded="True" />
16-
</Node>
17-
</Node>
18-
</Node>
7+
<Node name="KSFramework" expanded="True" selected="True" />
198
</State>
209
</Pad>
2110
</Pads>
2211
</MonoDevelop.Ide.Workbench>
23-
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
12+
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
2413
<MultiItemStartupConfigurations />
2514
<MonoDevelop.Ide.DebuggingService.Breakpoints>
2615
<BreakpointStore />
2716
</MonoDevelop.Ide.DebuggingService.Breakpoints>
28-
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
2917
</Properties>

.vs/KSFramework/xs/project-cache/KSFramework-Debug.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

KSFramework.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KSFramework", "KSFramework"
1919
EndProject
2020
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KSFramework.UnitTests", "tests\KSFramework\KSFramework.UnitTests\KSFramework.UnitTests.csproj", "{48D1B7B2-D99B-4554-BBFB-95E75720B8E5}"
2121
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KSFramework.IntegrationTests", "tests\KSFramework\KSFramework.IntegrationTests\KSFramework.IntegrationTests.csproj", "{C990672B-5ECD-4123-AF33-1F5CE23318E9}"
23+
EndProject
2224
Global
2325
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2426
Debug|Any CPU = Debug|Any CPU
@@ -65,6 +67,18 @@ Global
6567
{48D1B7B2-D99B-4554-BBFB-95E75720B8E5}.Release|x64.Build.0 = Release|Any CPU
6668
{48D1B7B2-D99B-4554-BBFB-95E75720B8E5}.Release|x86.ActiveCfg = Release|Any CPU
6769
{48D1B7B2-D99B-4554-BBFB-95E75720B8E5}.Release|x86.Build.0 = Release|Any CPU
70+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|x64.ActiveCfg = Debug|Any CPU
73+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|x64.Build.0 = Debug|Any CPU
74+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|x86.ActiveCfg = Debug|Any CPU
75+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Debug|x86.Build.0 = Debug|Any CPU
76+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
77+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|Any CPU.Build.0 = Release|Any CPU
78+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|x64.ActiveCfg = Release|Any CPU
79+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|x64.Build.0 = Release|Any CPU
80+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|x86.ActiveCfg = Release|Any CPU
81+
{C990672B-5ECD-4123-AF33-1F5CE23318E9}.Release|x86.Build.0 = Release|Any CPU
6882
EndGlobalSection
6983
GlobalSection(SolutionProperties) = preSolution
7084
HideSolutionNode = FALSE
@@ -75,5 +89,6 @@ Global
7589
{D849CD75-73AE-4F1A-80EA-0FC596C80723} = {B36C9166-6687-1700-0084-D88BD073518A}
7690
{6F746C7E-99E8-D040-B792-CDA2514E83CE} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
7791
{48D1B7B2-D99B-4554-BBFB-95E75720B8E5} = {6F746C7E-99E8-D040-B792-CDA2514E83CE}
92+
{C990672B-5ECD-4123-AF33-1F5CE23318E9} = {6F746C7E-99E8-D040-B792-CDA2514E83CE}
7893
EndGlobalSection
7994
EndGlobal

README.md

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
- ✅ Scrutor-based automatic registration
1717
- ✅ File-scoped namespaces and XML documentation for every component
1818
- ✅ Full unit test coverage using xUnit and Moq
19+
- ✅ Swagger/OpenAPI documentation support
20+
- ✅ Comprehensive XML documentation
1921

2022
---
2123

@@ -24,19 +26,71 @@
2426
Add the package reference (once published):
2527

2628
```bash
27-
dotnet add package KSFramework.Messaging
28-
dotnet add package KSFramework.Data
29+
dotnet add package KSFramework.KSMessaging
30+
dotnet add package KSFramework.KSData
2931
```
3032

3133
Or reference the source projects directly in your solution.
34+
35+
## 📚 API Documentation
36+
37+
### Swagger/OpenAPI Setup
38+
39+
1. Add Swagger configuration in your `Program.cs`:
40+
```csharp
41+
builder.Services.AddEndpointsApiExplorer();
42+
builder.Services.AddSwaggerGen(c =>
43+
{
44+
c.SwaggerDoc("v1", new OpenApiInfo
45+
{
46+
Title = "Your API Name",
47+
Version = "v1",
48+
Description = "API Documentation"
49+
});
50+
51+
// Include XML comments
52+
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
53+
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
54+
c.IncludeXmlComments(xmlPath);
55+
});
56+
```
57+
58+
2. Enable Swagger UI in your application:
59+
```csharp
60+
app.UseSwagger();
61+
app.UseSwaggerUI(c =>
62+
{
63+
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Your API V1");
64+
});
65+
```
66+
67+
### XML Documentation
68+
69+
The framework is configured to generate XML documentation. Add XML comments to your classes and methods:
70+
71+
```csharp
72+
/// <summary>
73+
/// Represents a generic repository for entity operations.
74+
/// </summary>
75+
/// <typeparam name="TEntity">The type of the entity.</typeparam>
76+
public interface IGenericRepository<TEntity> where TEntity : class
77+
{
78+
/// <summary>
79+
/// Retrieves an entity by its identifier.
80+
/// </summary>
81+
/// <param name="id">The identifier of the entity.</param>
82+
/// <returns>The entity if found; otherwise, null.</returns>
83+
Task<TEntity> GetByIdAsync(object id);
84+
}
85+
```
3286
3387

3488
🧠 Project Structure
3589
```
3690
src/
37-
KSFramework.Messaging/ → Custom mediator, behaviors, contracts
38-
KSFramework.Data/ → Repository, UnitOfWork, Specification
39-
KSFramework.SharedKernel/ → Domain base types, entities, value objects
91+
KSFramework.KSMessaging/ → Custom mediator, behaviors, contracts
92+
KSFramework.KSData/ → Repository, UnitOfWork, Specification
93+
KSFramework.KSSharedKernel/ → Domain base types, entities, value objects
4094
4195
tests/
4296
KSFramework.UnitTests/ → xUnit unit tests

Samples/MediatorSampleApp/Mediator.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net10.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

Samples/MediatorSampleApp/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using System.Reflection;
1+
using System.Reflection;
22
using FluentValidation;
3-
using KSFramework.Messaging.Abstraction;
4-
using KSFramework.Messaging.Extensions;
5-
using KSFramework.Messaging.Samples;
3+
using KSFramework.KSMessaging.Abstraction;
4+
using KSFramework.KSMessaging.Extensions;
5+
using KSFramework.KSMessaging.Samples;
66
using Microsoft.Extensions.DependencyInjection;
77

88
var services = new ServiceCollection();

src/KSFramework/Api/ApiResult.cs

Lines changed: 0 additions & 165 deletions
This file was deleted.

src/KSFramework/Domain/AggregatesHelper/IAggregateRoot.cs

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/KSFramework/Domain/BaseEntity.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/KSFramework/Domain/DomainServices/IDomainService.cs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)