TCIS.Core
1.4.1
dotnet add package TCIS.Core --version 1.4.1
NuGet\Install-Package TCIS.Core -Version 1.4.1
<PackageReference Include="TCIS.Core" Version="1.4.1" />
<PackageVersion Include="TCIS.Core" Version="1.4.1" />
<PackageReference Include="TCIS.Core" />
paket add TCIS.Core --version 1.4.1
#r "nuget: TCIS.Core, 1.4.1"
#:package TCIS.Core@1.4.1
#addin nuget:?package=TCIS.Core&version=1.4.1
#tool nuget:?package=TCIS.Core&version=1.4.1
TCIS.Core
📖 Overview
TCIS.Core is the foundational library (core primitives) of the TCIS Framework ecosystem. This library provides fundamental structures, guard clauses, base classes, along with the unified TValidationException structure and processing results (results) used consistently across all services.
✨ Features
- TGuard: A central Guard utility for throwing domain-typed exceptions (
TValidationException,TInvalidConfigException) instead of standard BCL exceptions. - Exceptions Taxonomy: System base exceptions (
StatusCode,Provider), includingTDomainStateExceptionfor domain state violations (CONFLICT_→ HTTP 409). See Domain state violations. - Extensions: Useful extension methods such as
GenericTypeExtensionsfor generic types. - Abstractions: Core interfaces related to processing contexts.
- DDD domain primitives live in the separate package
TCIS.SharedKernel(TDomainEntity<TId>,TAggregateRoot<TId>,TDomainEvent), which references this one.
📦 Installation
dotnet add package TCIS.Core
🚀 Usage
1. Using TGuard for Input Validation
Using TGuard is mandatory at trust boundaries such as Public Services, Middleware, Interceptors, etc.
using TCIS.Core.Abstractions;
public class MyService : IMyService
{
private const string Provider = "my-service";
public void DoWork(string userId, object payload)
{
// Check for Null or Whitespace
TGuard.NotNullOrWhiteSpace(userId, provider: Provider);
// Check for Null object
TGuard.NotNull(payload, provider: Provider);
// Business logic processing...
}
}
2. Guard with Configuration Parameters
When retrieving configuration data, use the configuration support function:
public class MyConfiguredService
{
private const string Provider = "my-configured-service";
public MyConfiguredService(IConfiguration config)
{
var apiKey = config["MyService:ApiKey"];
TGuard.NotNullOrWhiteSpaceConfig(apiKey, "MyService:ApiKey", Provider);
}
}
3. Domain state violations
A value that can never be valid is a guard violation (TValidationException, GUARD_ → HTTP 422).
A valid request that the current state rejects is a TDomainStateException (CONFLICT_ → HTTP 409):
using TCIS.Core.Abstractions;
using TCIS.Core.Errors;
// A method of a Rate aggregate (see TCIS.SharedKernel) that holds RateContent Content { get; private set; }.
public void Revise(RateContent content)
{
TGuard.NotNull(content, provider: Provider); // null is never valid: GUARD_NULL, HTTP 422
if (IsPublished)
{
// StatusCode becomes CONFLICT_RATE_ALREADY_PUBLISHED: HTTP 409.
throw new TDomainStateException(
statusCode: "RATE_ALREADY_PUBLISHED",
message: "A published rate cannot be revised.",
provider: Provider);
}
Content = content;
ContentRevision++;
}
| Situation | Exception | Prefix | HTTP |
|---|---|---|---|
| Input malformed (missing field, wrong format) | TValidationException |
VALIDATION_ |
400 |
Value can never be valid (null, empty id, negative quantity) |
TValidationException via TGuard |
GUARD_ |
422 |
| Valid input, but the current state forbids the operation | TDomainStateException |
CONFLICT_ |
409 |
A code that already carries a taxonomy prefix is kept: the prefix decides the HTTP status, not the
exception type. TExceptionMiddleware, TResultHttpStatusMapper and the log policy (WARN, not an
incident) all map CONFLICT_ the same way.
⚠️ Design Guidelines (TCIS Purity Rules)
- Zero external dependencies:
TCIS.Coredoes not contain references to EntityFramework, AspNetCore, Dapper, or any external libraries. - Prefix
T*: Primitive framework base classes are prefixed withT(e.g.,TGuard,TValidationException). Domain types MUST NOT use theT*prefix.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 8.0.6)
-
net8.0
- No dependencies.
NuGet packages (37)
Showing the top 5 NuGet packages that depend on TCIS.Core:
| Package | Downloads |
|---|---|
|
TCIS.Logging.Abstractions
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Logging abstractions for TCIS Framework. |
|
|
TCIS.Observability.Classification
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Dependency-free exception classification taxonomy (category / owner / dependency / support-level) for consistent, company-wide log typing. |
|
|
TCIS.Logging
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Logging services and integration for TCIS Framework. |
|
|
TCIS.Persistence.Abstractions
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Core Persistence Abstractions. |
|
|
TCIS.Pluggable.Abstractions
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. SDK for creating pipeline steps and contexts in TCIS Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.1 | 886 | 11/27/2026 |
| 1.2.0-rc.2 | 342 | 11/27/2026 |
| 1.1.4 | 917 | 11/25/2026 |
| 1.1.4-rc.1 | 354 | 11/17/2026 |
| 1.1.3 | 1,310 | 11/11/2026 |
| 1.1.2 | 1,148 | 11/10/2026 |
| 1.1.1 | 1,178 | 11/9/2026 |
| 1.1.0 | 1,168 | 11/7/2026 |
| 1.0.9 | 1,175 | 11/5/2026 |
| 1.0.9-rc.2 | 354 | 11/5/2026 |
| 1.0.9-rc.1 | 346 | 11/4/2026 |
| 1.0.8 | 1,190 | 11/3/2026 |
| 1.0.8-rc.11 | 370 | 10/30/2026 |
| 1.0.8-rc.10 | 290 | 10/30/2026 |
| 1.0.8-rc.9 | 288 | 10/30/2026 |
| 1.0.8-rc.8 | 292 | 10/29/2026 |
| 1.0.8-rc.7 | 302 | 10/27/2026 |
| 1.0.8-rc.6 | 319 | 10/27/2026 |
| 1.0.8-rc.5 | 309 | 10/23/2026 |
| 1.0.8-rc.4 | 302 | 10/23/2026 |