Skip to content

Commit 4297f65

Browse files
committed
Update README.md with .NET 10, xUnit, and modern development practices
- Updated features list to mention .NET 8.0/10.0 support - Added Central Package Management information - Updated Azure SDK version to 12.27.0 - Removed deprecated DI registration section - Added Development section with: * Requirements (.NET 8.0/10.0, Docker) * Building instructions * Running tests instructions * Test framework details (xUnit, TestContainers) * Central Package Management info - Fixed typos and improved clarity - Updated credits to reflect modernization efforts
1 parent 53ee6d4 commit 4297f65

1 file changed

Lines changed: 41 additions & 17 deletions

File tree

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
---
44

5-
65
[![.NET Build](https://github.com/0x414c49/AzureAutoNumber/actions/workflows/dotnet.yml/badge.svg)](https://github.com/0x414c49/AzureAutoNumber/actions)
76
[![Build Status](https://img.shields.io/github/license/0x414c49/AzureAutoNumber)]()
87
[![NuGet version (AzureAutoNumber)](https://img.shields.io/nuget/v/AzureAutoNumber.svg?style=flat-square)](https://www.nuget.org/packages/AzureAutoNumber/)
@@ -12,10 +11,13 @@ High performance, distributed unique thread-safe id generator for Azure.
1211
- Human-friendly generated ids (number)
1312
- High performant and fast
1413
- 100% guarantee that won't cause any duplicate ids
14+
- Supports .NET 8.0 and .NET 10.0
15+
- Modern Azure SDK (Azure.Storage.Blobs 12.27.0)
16+
- Central Package Management
1517

1618
## How to use
1719

18-
The project is rely on Azure Blob Storage. `AutoNumber` package will generate ids by using a single text file on the Azure Blob Storage.
20+
The project relies on Azure Blob Storage. `AutoNumber` package will generate ids by using a single text file on the Azure Blob Storage.
1921

2022

2123
```
@@ -32,7 +34,7 @@ var id2 = idGen.NextId("orders");
3234
```
3335

3436
### With Microsoft DI
35-
The project has an extension method to add it and its dependencies to Microsoft ASP.NET DI. ~~The only caveat is you need to registry type of `BlobServiceClient` in DI before registring `AutoNumber`.~~
37+
The project has an extension method to add it and its dependencies to Microsoft ASP.NET DI.
3638

3739

3840
Use options builder to configure the service, take into account the default settings will read from `appsettings.json`.
@@ -49,16 +51,6 @@ services.AddAutoNumber(Configuration, x =>
4951
});
5052
```
5153

52-
53-
#### Deprecated way to register the service:
54-
55-
56-
```
57-
// configure the services
58-
// you need to register an instane of CloudStorageAccount before using this
59-
serviceCollection.AddAutoNumber();
60-
```
61-
6254
#### Inject `IUniqueIdGenerator` in constructor
6355

6456
```
@@ -72,7 +64,7 @@ public class Foo
7264
```
7365

7466
### Configuration
75-
These are default configuration for `AutoNumber`. If you prefer registering AutoNumber with `AddAddNumber` method, these options can be set via `appsettings.json`.
67+
These are default configuration for `AutoNumber`. These options can be set via `appsettings.json`.
7668

7769
```
7870
{
@@ -83,9 +75,41 @@ These are default configuration for `AutoNumber`. If you prefer registering Auto
8375
}
8476
}
8577
```
86-
### Support
87-
Support this proejct and me via [paypal](https://paypal.me/alibahraminezhad)
78+
79+
## Development
80+
81+
### Requirements
82+
- .NET 8.0 SDK or .NET 10.0 SDK
83+
- Docker (for integration tests)
84+
85+
### Building
86+
```bash
87+
dotnet build --configuration Release
88+
```
89+
90+
### Running Tests
91+
```bash
92+
# Run all tests
93+
dotnet test --configuration Release
94+
95+
# Run only unit tests
96+
dotnet test UnitTests/UnitTests.csproj --configuration Release
97+
98+
# Run integration tests (requires Docker)
99+
dotnet test IntegrationTests/IntegrationTests.csproj --configuration Release
100+
```
101+
102+
### Test Framework
103+
- **Unit Tests:** xUnit 2.9.3
104+
- **Integration Tests:** xUnit 2.9.3 with TestContainers.Azurite
105+
- **Mocking:** NSubstitute 5.3.0
106+
107+
### Central Package Management
108+
This project uses Central Package Management (CPM). All NuGet package versions are managed in `Directory.Packages.props` at the root level.
109+
110+
## Support
111+
Support this project and me via [PayPal](https://paypal.me/alibahraminezhad)
88112

89113

90114
## Credits
91-
Most of the credits of this library goes to [Tatham Oddie](https://tatham.blog/2011/07/14/released-snowmaker-a-unique-id-generator-for-azure-or-any-other-cloud-hosting-environment/) for making SnowMaker. I forked his work and made lots of change to make it available on .NET Standard (2.0 and 2.1). SnowMaker is out-dated and is using very old version of Azure Packages.
115+
Most of the credits of this library goes to [Tatham Oddie](https://tatham.blog/2011/07/14/released-snowmaker-a-unique-id-generator-for-azure-or-any-other-cloud-hosting-environment/) for making SnowMaker. I forked his work and made lots of changes to modernize it with the latest .NET versions and Azure SDK.

0 commit comments

Comments
 (0)