Cloudey.Reflex.Core 2.0.0

Prefix Reserved
dotnet add package Cloudey.Reflex.Core --version 2.0.0                
NuGet\Install-Package Cloudey.Reflex.Core -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cloudey.Reflex.Core" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cloudey.Reflex.Core --version 2.0.0                
#r "nuget: Cloudey.Reflex.Core, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cloudey.Reflex.Core as a Cake Addin
#addin nuget:?package=Cloudey.Reflex.Core&version=2.0.0

// Install Cloudey.Reflex.Core as a Cake Tool
#tool nuget:?package=Cloudey.Reflex.Core&version=2.0.0                

Reflex

Core


An opinionated framework setup for common functionality.

Installation

Install with NuGet

For a quick start, use the AddReflexCore extension method on the host builder. This will register the logging, configuration, caching, validation, Autofac, and common ASP.NET Core services.

// Program.cs

var builder = WebApplication.CreateBuilder(args);

builder.AddReflexCore();
Git

Add the following to your .gitignore file to ignore local configuration files:

**/appsettings.Local.*
**/appsettings.*.Local.*

Including assemblies

Reflex makes extensive use of assembly scanning to discover types. You should mark your assemblies with the IncludeAssembly attribute to ensure they are included in the scanning process.

// Anywhere in the assembly
[assembly: IncludeAssembly]

Configuration

Usage
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.AddReflexConfiguration(); // <-- Register configuration
Configuration files

Important: YAML files on the same level always take precedence over JSON files. It is highly recommended to use YAML files exclusively.

I.e. if you have both appsettings.json and appsettings.yaml in the same directory, the YAML file will be used.
If you have appsettings.yaml and appsettings.Development.json, the JSON file will be used in development.

Precedence - from highest to lowest:

  • APP__ environment variables
  • appsettings.{Environment}.Local.yaml
  • appsettings.{Environment}.Local.json
  • appsettings.{Environment}.yaml
  • appsettings.{Environment}.json
  • appsettings.Local.yaml
  • appsettings.Local.json
  • appsettings.yaml
  • appsettings.json

Sentry

To enable Sentry, configure the DSN in your application settings (preferably in a .Local.yaml file):

Sentry:
  Dsn: YourSentryDsnFromSentryDashboard

Then enable logging:

// Program.cs

var builder = WebApplication.CreateBuilder(args);

// ...

builder.AddReflexLogging();

Logging

This package includes integration with Serilog and Sentry for logging.

Enable logging with:

// Program.cs

var builder = WebApplication.CreateBuilder(args);

// ...

builder.AddReflexLogging();

You can configure the logging level with the configuration key Logging.Level.

Made by

Cloudey

License

Licensed under Apache 2.0.
Copyright © 2023 Cloudey IT Ltd
Cloudey® is a registered trademark of Cloudey IT Ltd. Use of the trademark is NOT GRANTED under the license of this repository or software package.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cloudey.Reflex.Core:

Package Downloads
Cloudey.Reflex.Database

Provides an opinionated setup for Entity Framework Core using a PostgreSQL database. See README for usage instructions.

Cloudey.Reflex.GraphQL

Provides an opinionated GraphQL server setup for the Reflex framework. See README for usage instructions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 142 4/19/2024
1.2.0-preview.1 143 7/16/2023
1.0.4 203 7/29/2023
1.0.3 175 6/19/2023
1.0.2 185 5/15/2023
1.0.1 195 4/23/2023
1.0.0 253 4/23/2023