Skip to content

An opinionated patterns library that combines many patterns through fundamental abstractions providing your application developer insights never before captured

Notifications You must be signed in to change notification settings

Reapism/Sweaj.Patterns

Repository files navigation

Sweaj.Patterns C# .Net .NET

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.

Advisory

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

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 { ... }

GitHub

About

An opinionated patterns library that combines many patterns through fundamental abstractions providing your application developer insights never before captured

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages