Sweaj.Patterns
1.1.8-beta
See the version list below for details.
dotnet add package Sweaj.Patterns --version 1.1.8-beta
NuGet\Install-Package Sweaj.Patterns -Version 1.1.8-beta
<PackageReference Include="Sweaj.Patterns" Version="1.1.8-beta" />
paket add Sweaj.Patterns --version 1.1.8-beta
#r "nuget: Sweaj.Patterns, 1.1.8-beta"
// Install Sweaj.Patterns as a Cake Addin #addin nuget:?package=Sweaj.Patterns&version=1.1.8-beta&prerelease // Install Sweaj.Patterns as a Cake Tool #tool nuget:?package=Sweaj.Patterns&version=1.1.8-beta&prerelease
Sweaj.Patterns
A library intended for easily adapting familiar & flexible abstractions of many patterns I use today. Keep in mind that this is opinionated, and what drives me is flexible, but minimally functional. The library uses common contracts across multiple patterns which guides the development of a cohesive application, it makes it more rigid to follow specific patterns if you choose to, which makes diagnostics more simple, and architecture more guided.
Adisory status
This library is under heavy development, I wouldn't advise using this library yet as most of the updates contain breaking changes. I am currently updating this library as I continue to work with these patterns and find a good balance of flexibility and an opinionated approach to its contracts and implementations.
Library Features
- AI
- Attributes
- Cache
- Converters
- Data
- DDD (Domain Driven Design)
- Entities, AuditableEntities
- Repositories
- UnitOfWork
- ValueObjects
- Values (ValueStore & DataStore)
- Dates
- Exceptions
- Guards
- Logging
- Mapping
- NullObject
- Options
- Reflection
- Rest (Request/Response)
- Scientific
- Serialization
WIKI
See the wiki for examples of each! Below are the best uses of library examples
IValueProvider<TValue>
A mechanism for providing a valid value of something.
This is used thoroughly in the patterns library as being the payload for a request, the response object for responses, an entity in a database, or File contents, it represents the underlying value of an object.
Conversions
Conversions are simple, you convert a source
value to a target
value.
The IConverter
interface represents a contract for converting an object from one type to another synchronously, while the IAsyncConverter
interface represents a contract for converting an object from one type to another asynchronously, optionally supporting cancellation.
string str = "7"
int convertedValue = converter.Convert(str);
// convertedValue = 7
Request / Response
The ApiResponse
encapsulates the minimum ApiResponse, that
public class ApiResponse { ... }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Ardalis.GuardClauses (>= 4.2.0)
- JetBrains.Annotations (>= 2023.3.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.8.0)
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sweaj.Patterns:
Package | Downloads |
---|---|
TaskRipper.Core
A simple, easy-to-use lightweight, no-dependency library for executing an `Actionable<TRequest, TResult>` delegate N times. The library provides a way to balance the number of iterations requested by delegating a specific amount of iterations per thread on your machine supporting cancellation tokens per iteration. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.2.5 | 73 | 10/21/2024 | |
1.2.4 | 122 | 10/3/2024 | |
1.2.3 | 89 | 10/3/2024 | |
1.2.2 | 83 | 10/3/2024 | |
1.2.1 | 86 | 10/3/2024 | |
1.2.0 | 133 | 8/13/2024 | |
1.1.8 | 201 | 11/30/2023 | |
1.1.8-beta | 115 | 11/30/2023 | |
1.1.7-beta | 115 | 11/30/2023 | |
1.1.6-beta | 117 | 11/30/2023 | |
1.1.5-beta | 126 | 11/29/2023 | |
1.1.4-beta | 100 | 11/29/2023 | |
1.1.3-beta | 128 | 11/29/2023 | |
1.1.2-beta | 114 | 11/28/2023 | |
1.1.1-beta | 117 | 11/28/2023 | |
1.1.0-beta | 114 | 11/27/2023 | |
1.0.8-beta | 151 | 10/21/2023 | |
1.0.7-beta | 125 | 9/29/2023 | |
1.0.6-beta | 181 | 7/26/2023 | |
1.0.5 | 221 | 7/18/2023 | |
1.0.4 | 234 | 6/13/2023 | |
1.0.3 | 322 | 2/24/2023 | |
1.0.2 | 297 | 2/24/2023 | |
1.0.0 | 476 | 1/27/2023 | |
1.0.0-1.0.90 | 125 | 2/16/2023 | |
1.0.0-1.0.89 | 128 | 2/16/2023 | |
1.0.0-1.0.0 | 130 | 2/24/2023 |
Update ApiResponse