EastFive.Core 1.0.0-preview-0074

This is a prerelease version of EastFive.Core.
dotnet add package EastFive.Core --version 1.0.0-preview-0074
                    
NuGet\Install-Package EastFive.Core -Version 1.0.0-preview-0074
                    
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="EastFive.Core" Version="1.0.0-preview-0074" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EastFive.Core" Version="1.0.0-preview-0074" />
                    
Directory.Packages.props
<PackageReference Include="EastFive.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EastFive.Core --version 1.0.0-preview-0074
                    
#r "nuget: EastFive.Core, 1.0.0-preview-0074"
                    
#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.
#:package EastFive.Core@1.0.0-preview-0074
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EastFive.Core&version=1.0.0-preview-0074&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EastFive.Core&version=1.0.0-preview-0074&prerelease
                    
Install as a Cake Tool

EastFive

Functional-programming libraries for .NET: a composable core (TResult continuations, IEnumerableAsync, attribute-interface IoC), an attribute-routed REST API framework, Azure persistence/auth/integration bindings, spreadsheet tooling, and Roslyn source generators.

Package Description
EastFive.Core Functional primitives, LINQ extensions, async collections, configuration, reflection
EastFive.Api Attribute-routed HTTP API framework for ASP.NET Core
EastFive.Azure Azure Storage/Table persistence, auth (OAuth/SAML/Ping), integrations
EastFive.Sheets XLSX/CSV reading and writing
EastFive.Generators Roslyn source generators (flow extensions, storage query helpers, test harness) and the E5001 storage-table analyzer

All packages ship one shared version, MIT-licensed, with embedded PDBs and embedded source (step-into debugging works without symbol servers).

This mono-repo supersedes the former EastFive.Core, EastFive.Api, EastFive.Azure, EastFive.Sheets, and EastFive.Generators repositories; their histories are preserved under src/.

Build

dotnet build EastFive.sln
dotnet test EastFive.sln   # Azure tests require a running Azurite

Configuration and secrets

EastFive reads configuration from two stores and never mixes them.

Store What Where
Values Non-secret settings: endpoints, ids, account names, flags IConfiguration (appsettings files, environment), initialized with ConfigurationExtensions.Initialize
Secrets Keys, client secrets, connection strings ISecretStore, queried by name — never an IConfiguration provider

Typed configuration is the only way to read a secret

Every setting a feature needs is a property of an IProvideConfiguration type. Values are declared with their key; secrets are declared without one:

[ConfigurationType("Telnyx")]
public sealed class TelnyxConfiguration : IProvideConfiguration
{
    [ConfigurationMember("Telnyx.Account", Account = true, Label = "Account")]
    public string Account { get; set; }

    [ConfigurationMember(Kind = ConfigurationMemberKind.Secret, Label = "API key")]
    public Secret ApiKey { get; set; }
}

var outcome = await ConfigurationLoader.LoadAsync<TelnyxConfiguration, TResult>(
    onConfigured, onMissing, onInvalid, onSourceFailure);

Secret has no public value: Reveal() it at the point of use, and never into a log, an exception or a response.

All configuration is typed

Values are typed too. Every setting EastFive itself reads — secret or not — is a member of an IProvideConfiguration type, and its key is a {Member}Key constant on that type (SessionServerConfiguration.LandingPageKey). There is no raw read API: the ConfigurationString family, Settings.Get*, IProvideConfigurationKey and the old AppSettings key-constant classes are deleted, not deprecated. ConfigurationExtensions.Initialize installs the ambient configuration a host built, and only the loader (src/EastFive.Core/Configuration/) reads a key from it — ConfigurationLoader.ReadAmbient is internal. Configured.ReadDeclaredValue serves the few APIs that take a key name, and only for a key some typed member declares. A guard test in each framework test project asserts no assembly exposes a public raw read and no framework source reads IConfiguration, ConfigurationManager or the environment directly (the one allowlisted read is the vault credential choice in KeyVaultSecretStore, which runs before configuration exists).

At the point of use, framework code reads through Configured:

Configured.Get<CorsConfiguration, TResult>(cors => …, issue => …);
SessionServerConfiguration.WithLandingPage(uri => …, why => …);   // Configured.Member, callback-shaped

A value-only type is loaded synchronously from the ambient values on every read, so it is always current; a type with secret members is served from the host's startup load and never loaded there. Put a value on a secret-bearing type only when every reader of the value also needs that secret — otherwise a missing secret would take the value down with it — and give it a value-only type instead (ApplicationInsightsTelemetryConfiguration beside ApplicationInsightsQueryConfiguration).

Keyed families — one instance per name, such as a Ping redirect or a SAML provider per tag — implement IProvideConfigurationInstanceKey. Member keys carry a {key} placeholder, a FallbackKey may name a former spelling, and ConfigurationCatalog.InstanceKeys(type) lists the instances the configuration names. A keyed type may declare secrets too: each instance reads its own, named by its instance key (see Generated secret names), and is loaded on first use rather than at startup (see Keyed instances: load on first use).

A member that holds JSON accepts both a JSON string and a structured appsettings.json section at its key.

Every member is described. A catalog-completeness test requires a label and description on every type and member and a declared scope (on the member, or as the type's default via [ConfigurationType(…, Scope = …)]); the SuperAdmin Configuration endpoint renders the catalog, keyed instances included, and never a secret's value.

Generated secret names

Secret names are never hand-written. {Type}-{Account}-{Property} for a type with an account member, {Type}-{Property} otherwise: Type is the [ConfigurationType] name, Account the account member's value, Property the secret member's property name. Names are valid Azure Key Vault secret names ([A-Za-z0-9-]); an account id that would not be is refused, never mapped — unless the account member declares an injective translation with an attribute implementing IProvideSecretAccountSegment (Google client ids drop their constant .apps.googleusercontent.com domain). The translated segment is still validated.

A keyed type's instance key is the account of its secrets. A keyed type with secret members and no account member reads {Type}-{InstanceKey}-{Property}, so every instance has its own secret:

[ConfigurationType("VendorWebhook")]
public sealed class VendorWebhookConfiguration : IProvideConfiguration, IProvideConfigurationInstanceKey
{
    public VendorWebhookConfiguration(string webhookId) => InstanceKey = webhookId;

    [EncodedSecretAccountSegment]                 // only if the id may not be a valid segment
    public string InstanceKey { get; }

    [ConfigurationMember(Kind = ConfigurationMemberKind.Secret, Label = "Signing secret")]
    public Secret SigningSecret { get; set; }     // VendorWebhook-{webhookId}-SigningSecret
}

A declared account member still names the secrets, and a type that overrides SecretReference names its own; neither is affected. The translation goes on the InstanceKey property, with the same attribute an account member uses. An instance key that cannot name a secret is an Invalid issue (key InstanceKey) reported before any secret is read, exactly as an invalid account is.

The general translation is [EncodedSecretAccountSegment], for an id whose format is not ours to choose. It is opt-in, on an account member or an InstanceKey:

  • a plain segment — letters and digits in groups joined by single dashes — is unchanged, so ids that never needed it keep their names;
  • anything else becomes e followed by each character: an ASCII letter or digit as itself, every other character (each dash included) as -- and two lowercase hex digits per UTF-8 byte. wh_abc is ewh--5fabc; _a is e--5fa.

A plain segment never contains -- and an escaped one always does, so the two cannot meet. EncodedSecretAccountSegmentAttribute.TryDecode reads a segment back. Vault names ignore letter case, so the only ids that share a name are ones that differ by letter case alone. The empty string is still refused.

The account rule: an account member used for secret naming must be vault-safe by FORMAT or declare its translation. The catalog checks a draft value (ConfigurationTypeDescription. AccountProblem) before it is written, and an unsafe declared default is a declaration error. A vendor id that could ever be unsafe is never given a hand-picked alias member; it gets a translation, so the vendor id stays the one value an operator enters. Types that share a [ConfigurationType] and an account share one secret — every StorageAccountConfiguration on account prod reads AzureStorage-prod-ConnectionString.

ConfigurationCatalog.For(assemblies) lists every configuration type with its members, metadata (label, description, location, scope, field kind) and generated names; editors and doctors render from it. For a keyed type whose instance key names its secrets (NamesSecretsByInstanceKey), the template keeps the {account} placeholder, SecretNames(instanceKey) names one instance's secrets and AccountProblem(instanceKey) judges a draft instance key. IProvideConfigurationLookup and ITestConfiguration are the attribute-interface hooks for choices and live checks of a ConfigurationDraft; IProvideConfigurationInstanceLookup, on a keyed TYPE, offers the instances an editor can add (an instance key and a label each, never secret material) — the catalog can list only the instances a configured value key already names. ConfigurationLoader.InspectAsync(construct) reports how each member of one type stands against the ambient values and SecretStore.Current (names and sources, never values), a keyed instance's secret under its real name; the overloads taking a readValue function inspect explicit sources instead.

Generated values

A member whose value can be generated says so with an attribute implementing IGenerateConfigurationValue (at most one per member; a second is a declaration error). The configuration type decides which members have one; there is no framework allowlist.

[ConfigurationMember(Kind = ConfigurationMemberKind.Secret, Label = "Engine secret")]
[GenerateRandomBytes(32)]                       // 43 characters, base64url
public Secret EngineSecret { get; init; } = default!;

[ConfigurationMember(Kind = ConfigurationMemberKind.Secret, Label = "Signing key")]
[RsaKey(KeyIdMember = nameof(KeyId),            // a typed key value: parses, validates AND generates
    Instruction = "Upload the JWKS at the vendor's portal, then save.", InstructionLink = "https://…")]
public RsaPrivateKey SigningKey { get; init; } = default!;

Generation is READ-ONLY. ConfigurationGeneration.GenerateAsync(context, onGenerated, onNoGenerator, onRefused) runs the member's generator over a ConfigurationGenerationContext (the type, the member, the type's current draft by property name, the environment, the account or instance, and injectable Random / Clock sources) and returns a ConfigurationGenerationResult:

  • Values — member → value, for members of the SAME type only. A result naming any other member, or a value its member cannot hold, is refused (the reason names members, never values). A type's own generator may fill several members, e.g. the empty slot of a two-key rotation.
  • Outputs — {Label, Value, Kind: Text|Pem|Json}, display-only and never stored: a public key, a JWKS entry, a key id to paste elsewhere.
  • Instructions — {Text, Link?}, the steps to take outside configuration.

An editor puts the values in its drafts; the user saves them through the ordinary write paths. The context carries draft secrets: never log it (its ToString names only the type and member).

Built-in Member value Outputs
GenerateRandomBytes(length = 32) random bytes; Encoding Base64Url (default), Base64, Hex —
GenerateGuid a version 4 GUID; Format D (default), N, B, P —

Keys and shared secrets are not generated by these: each typed key value's attribute is its own generator (see "Typed key values" below). Every built-in takes KeyIdMember (a member of the same type that receives the new value's id; for these, a dated yyyy-MM-dd-xxxxxxxx) and Instruction / InstructionLink. Rotation overlap (two active keys) belongs to the consuming code, expressed as members of its own type.

Generation inputs. A generator may need something from the user beyond the draft — an admin credential to provision a client at a registry, a certificate's common name. It declares them as Inputs (ConfigurationGenerationInput(Name, Label, Secret, Description, Optional); a default interface member, empty unless overridden), the catalog describes them (ConfigurationMemberDescription.GeneratorInputs), and the caller passes the answers in ConfigurationGenerationContext.Inputs (read with InputValue(name), case-insensitive). The runner refuses a generate that lacks a required input, naming the input, before the generator runs. A Secret input is a credential: never argv, logs, persisted editor state or an exception message.

A generator may fail cleanly. ConfigurationGenerationResult.Failed(reason) (a registry refused, an endpoint did not answer) reaches the caller as a refusal with that reason; the reason names endpoints and statuses, never a credential or a value.

What EastFive generates for its own members:

Member Generator Fills Note
EastFiveTokens-SigningKey, EastFiveVoucher-SigningKey, EastFiveAdminLogin-SigningKey [RsaKey] the key (PKCS#8 PEM) tokens / vouchers / admin-login links signed with the old key stop validating
EastFiveApi-ApiKey, EastFiveSiteAdmin-Authorization, StorageDiagnostics-TableInformationToken [SharedSecret] the secret callers presenting the old value are refused
StorageEncryption-EncryptionKey + -EncryptionSalt [StorageEncryptionKey] the passphrase (32 random bytes, base64url) AND a new GUID salt every app reading the same [StoreEncrypted] rows needs both; rows encrypted with the old pair become unreadable
EastFiveAccessTokens-SigningSecret [GenerateGuid] a GUID signed links issued with the old value stop verifying
SamlServiceProvider-PrivateKey + the SP certificate [SamlServiceProviderKey] (input: optional common name) an RSA-2048 key AND a self-signed X.509 certificate (SHA-256, 2 years, random serial; base64 DER under EastFive.Security.CredentialProvider.SAML.ServiceProviderCertificate) outputs the certificate PEM and fingerprint; re-register the SP at every IdP

The SAML key is its own type, SamlServiceProviderConfiguration (SamlServiceProvider), which declares the certificate under the SAME values key SamlConfiguration reads: a secret member on SamlConfiguration would move that value-only type to the startup load, and a host without the key would publish metadata without a certificate. Nothing signs with the key yet; it is kept so the certificate can be renewed. Validate refuses a certificate that does not belong to the key.

Typed key values

The configuration TYPE documents purpose (a key with its key id and client id); the member's VALUE TYPE documents the kind of key. A key member is typed, never a string:

Value type (EastFive.Security) Member attribute Accepts Validates Gives the consumer Generates
RsaPrivateKey [RsaKey(MinBits = 2048, Algorithm = "RS256")] PKCS#8 or PKCS#1 PEM; base64 DER (PKCS#8, then PKCS#1); base64 .NET RSA XML; private JWK private parameters present; at least MinBits shared Rsa (never dispose) / CreateRsa(); Algorithm; PublicJwk() (base64url); Thumbprint (RFC 7638); PublicKeyPem PKCS#8 PEM; outputs public key PEM, JWKS, key id
EcPrivateKey [EcKey(ConfigurationEcCurve.P384)] SEC1 or PKCS#8 PEM; base64 DER (PKCS#8, then SEC1); private JWK the declared curve shared Ecdsa / CreateEcdsa(); Algorithm (P-256 ES256, P-384 ES384, P-521 ES512); PublicJwk(); Thumbprint; PublicKeyPem PKCS#8 PEM on the curve; same outputs
SymmetricKey [SymmetricKey(32, Encoding = Base64)] ONLY the declared encoding (base64, base64url or hex), never guessed exact byte length ToArray() (a copy) random bytes in the declared encoding
SharedSecret [SharedSecret(MinLength = 32)] any text, used as UTF-8 at least MinLength bytes Matches(presented) (constant time); Reveal() only to SEND it; Utf8Bytes() 32 random bytes, base64url

How a key pair's text is recognised: a PEM header is PEM (literal \n escapes are unfolded); otherwise base64, where <RSAKeyValue is the .NET XML and anything else is DER, tried as PKCS#8 then PKCS#1/SEC1; otherwise JSON, a JWK. Anything else is the member's load error, and the message names kinds, never the value: "expected EC P-384 private key; got P-256", "expected RSA private key; got public key only", "RSA 1024 < 2048". Because readers accept every encoding, existing values (RSA XML, SEC1 DER) keep loading while new keys are written as PEM.

The hook is IParseConfigurationValue, implemented by a member ATTRIBUTE (it carries the member's constraints): ValueType, ValueKind, AcceptedFormats, IsSecretMaterial and Parse. A member typed with something the loader does not convert needs exactly one; key material must be a Secret-kind member. A parse failure is ConfigIssueCategory.Invalid with ConfigIssue.Problem (and ConfigurationMemberStatus.Problem from InspectAsync), and ConfigurationMemberDescription carries ValueKind and AcceptedFormats for an editor. ConfigurationMember.TryConvert is the one conversion every caller goes through.

A key pair's generated key id is its RFC 7638 thumbprint (JsonWebKeyThumbprint). A key id that is already configured or registered is never replaced: the JWKS endpoint keeps its own kid derivation, and its alg follows the configured TokenSigningConfiguration.Algorithm (TokenSigning.JwsAlgorithm). EastFive's members: TokenSigningConfiguration.SigningKey, VoucherConfiguration.SigningKey and AdminLoginConfiguration.SigningKey are RsaPrivateKey; ApiKeyConfiguration.ApiKey, SiteAdminAuthorizationConfiguration.Authorization, TableInformationConfiguration.TableInformationToken and StorageEncryptionConfiguration.EncryptionKey (a PBKDF2 passphrase) are SharedSecret. The base64-XML RSA and ECDSA helpers are deleted.

Adopting library configuration

An assembly that USES a configuration type declared in a library it references adopts it, so an editor groups the type under the code that uses it instead of the library that declares it:

[assembly: AdoptsConfiguration(typeof(StorageTablesConfiguration),
    Description = "Workflow runs, their state and the dispatch queues.", Required = true)]

Adoption is presentation only. The adopter may set Label, Description (its usage text), Location, MoreInfo and Required (missing values make the type incomplete for that app, not merely unconfigured). Keys, secret names, defaults and validation stay the library's, because the library still reads its own keys; there is deliberately no way to override a default. ConfigurationAdoptions.Of(assembly) lists an assembly's adoptions and refuses a malformed one (not a concrete configuration type, declared by the adopter itself, from an assembly it does not reference, or adopted twice). ConfigurationGraph.Of(roots) walks a host's reference graph and orders it by dependency depth — roots first, then by the longest reference path from the roots, so an assembly always comes before the assemblies it references; ties by root order, then name. Place(type) is by distance, not that order: it puts each type under the adopter closest to the roots, listing the other adopters as also using it; a type nobody in the graph adopts stays under its declaring assembly.

Where secrets come from

A host initializes SecretStore.Current next to ConfigurationExtensions.Initialize, typically:

SecretStore.Initialize(new CompositeSecretStore(
    SecretStore.AmbientOverrides,                                       // Secrets:{name}
    KeyVaultSecretStore.From(vaults)));                                 // the environment's vaults, in order
  1. Local override: Secrets:{generated-name} in the values store — written only in appsettings.local*.json or the environment (Secrets__AzureStorage-dev-ConnectionString).
  2. The environment's vaults, in order: one SecretClient per vault. 404 falls through to the next vault; any other error is a failure, so an outage is never read as "unset". Found and missing answers are cached per name for 30 minutes.

Each KeyVaultAccess entry declares exactly ONE access mode, and mixing them is an error naming the vault (the entry is skipped and From's onWarning says why):

Entry Credential
tenantId + clientId + clientSecret ClientSecretCredential (a service principal)
managedIdentity: true ManagedIdentityCredential
useAzureCli: true (optional tenantId) AzureCliCredential: the developer's az login, no secret on disk
nothing managed identity when deployed (WEBSITE_SITE_NAME), otherwise unusable

On a deployed host useAzureCli is ignored with a warning and managed identity applies. KeyVaultAccess.CreateCredential is the one construction, public so a probe builds exactly what a read uses (ResolveMode answers the mode without building anything).

A failure reaches the caller as a SecretFailure: a Kind (auth_failed, forbidden, network, credential_unavailable, other), the HTTP status, the AADSTS code parsed from an AuthenticationFailedException (7000222 expired secret, 7000215 invalid secret, 700016 unknown application, 90002 unknown tenant) and the service error code (ForbiddenByRbac). Its message is composed from those parts, never copied from the SDK, so it carries no ids or secrets. KeyVaultFailures.Classify is public for the same probe. A typed load keeps it: a SourceFailure ConfigIssue carries the Failure, and its message becomes the Problem.

Until a host initializes it, SecretStore.Current is the local overrides alone.

Synchronous readers: load at startup

Loading a type with secret members is asynchronous. Code that cannot await — attributes, the storage driver factory, token signing — reads a configuration the host loaded once at startup:

await StartupConfiguration.LoadAsync(new[] { typeof(EastFive.Azure.Persistence.StorageAccount).Assembly, /* … */ });
StartupConfiguration.Get<TokenSigningConfiguration, TResult>(onLoaded, onUnavailable);   // never loads, never blocks

A type the host did not load answers ConfigIssueCategory.NotLoaded. RefreshEveryAsync re-reads the loaded types on an interval to pick up rotated secrets.

Keyed instances: load on first use

A keyed type is never part of the startup load: it has no parameterless constructor, and its instances are not known until something names one. An instance with secrets is loaded where it is used, from the ambient values and SecretStore.Current, and cached:

await Configured.GetAsync(() => new VendorWebhookConfiguration(webhookId), onConfigured, onUnavailable);
Configured.Get(() => new VendorWebhookConfiguration(webhookId), onConfigured, onUnavailable);   // the cache only
  • The cache is StartupConfiguration.Instances (a ConfigurationInstanceCache), keyed by (type, instance key), ignoring the key's case. Callers that arrive while an instance is loading share that one load.
  • A loaded configuration is kept until StartupConfiguration.RefreshAsync / RefreshEveryAsync re-reads it or StartupConfiguration.Forget<T>(instanceKey) drops it. A refresh that meets a SourceFailure keeps the loaded configuration.
  • An issue is kept for 60 seconds (ConfigurationInstanceCache.DefaultIssueLifetime) and then re-read on the next use: a secret added to the vault is picked up without a restart, and a missing one does not reach the vault on every request. Stale issues nobody asks about again are dropped.
  • The synchronous Configured.Get(construct, …) never loads. An instance nothing has loaded yet answers NotLoaded — it no longer throws for a keyed type with secrets. A value-only keyed type is still read live, by either call.

ConfigurationLoader.LoadAsync(construct, onConfigured, onMissing, onInvalid, onSourceFailure) is the uncached load of one instance over the same ambient sources. A ConfigurationInstanceCache built over explicit sources (and a clock) serves an editor or a test.

Storage

A store is named by its StorageAccountConfiguration type (StorageAccount.Tables, StorageAccount.Of<T>()); its account comes from <Store>.Account and its credential from AzureStorage-{account}-ConnectionString. The emulator account devstoreaccount1 is fabricated from Azure.Storage.Emulator.Port and never read from the secret store.

A table declares a public ETag member, or its updates are last writer wins. StorageUpdateAsync and StorageLockedUpdateAsync save conditionally only when the table type has a public field or property, declared or inherited, carrying [ETag] (any attribute implementing IModifyAzureStorageTableETag). Then a row changed since it was read is read again and the mutation runs again on it. Without one the row is replaced with *: the mutation runs once, the last writer wins, and two callers can both take a lock. A non-public member is not found.

[StorageTable]
public class Order : IReferenceable
{
    [RowKey] public IRef<Order> orderRef;
    [ETag] public string eTag;   // row metadata, not a column: adding it needs no migration
}

EastFive.Generators reports E5001 (warning, category EastFive.Storage) on a type whose attribute implements IProvideEntity and that has no such member. Suppress it with the usual mechanisms (#pragma warning disable E5001, [SuppressMessage], .editorconfig) where an unconditional save is intended, such as a table whose rows are only created and deleted. Adding the member changes behaviour in three places. A conflicting StorageUpdateAsync now re-runs its mutation: the whole of it, from a fresh read, and then the first attempt carries on after its save with its result discarded, so everything in a mutation, before and after the save, must be safe to run twice. StorageReplaceAsync of an instance that was read from storage is refused (UpdateConditionNotSatisfied) once the row has changed since that read. An instance that was not read carries no ETag and still replaces the row unconditionally. And a delete becomes conditional on the ETag read just before it. A delete by reference or key, or of a held instance with no onModified, that meets a change made in between reads the row again and deletes it, with the delete modifiers run against the fresh values; onDeleted receives the row actually deleted. A held instance's onModified, when passed, is called with the fresh row and a delete of it. StorageDeleteIfAsync runs its onFound again on the fresh row, like an update's mutation. A delete of a missing row with no not-found handler throws an InvalidOperationException.

EastFive.Azure's own tables follow the same rule. Authorization, Session, Login.Account, Authentication, XIntegration, InvocationMessage, VoucherToken and Integration.AccountIntegrationLookup carry the member. The analyzer does not run in the library's own build; StorageTableETagCoverageTests checks every table type in it instead, and lists each one without the member with its reason.

Entity JSON without a request

JsonBinding (EastFive.Api) writes and reads entity JSON through the V3 binding framework with no IHttpRequest or IApplication — for snapshots, exports, hashes and documents stored as JSON:

JToken json = JsonBinding.Write(entity, options: new JsonBindingOptions { OmitNulls = true });
var copy = JsonBinding.Read<Entity>(JsonBinding.Parse(text));   // Parse keeps date-like strings and exact decimals
var merged = JsonBinding.Populate(patch, existing);              // present members overwrite, absent keep

Members are chosen as ApiPropertyContractResolver chooses them under the ResponseBody scope (pass another memberScope to change it): a type in a RegisterManagedAssembly'd assembly that tags members with V3 [ApiProperty] writes only those; any other type gets Newtonsoft's default members. The output matches Newtonsoft with that resolver, except that refs are ids, enums are names, get-only members are skipped, and a [JsonConverter] other than StringEnumConverter on an enum throws. A read failure throws JsonBindingException naming the key path. Calls complete synchronously. HTTP responses do not go through JsonBinding yet.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on EastFive.Core:

Package Downloads
EastFive.Sheets

Package Description

EastFive.Api

Package Description

EastFive.Azure

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview-0074 42 11/25/2026
1.0.0-preview-0073 66 11/25/2026
1.0.0-preview-0072 72 11/24/2026
1.0.0-preview-0071 77 11/24/2026
1.0.0-preview-0070 68 11/24/2026
1.0.0-preview-0069 70 11/24/2026
1.0.0-preview-0068 95 11/22/2026
1.0.0-preview-0067 88 11/21/2026
1.0.0-preview-0066 75 11/21/2026
1.0.0-preview-0065 73 11/21/2026
1.0.0-preview-0064 89 11/20/2026
1.0.0-preview-0063 73 11/20/2026
1.0.0-preview-0061 265 11/17/2026
1.0.0-preview-0060 177 11/16/2026
1.0.0-preview-0059 251 11/10/2026
1.0.0-preview-0058 122 11/8/2026
1.0.0-preview-0057 142 11/5/2026
1.0.0-preview-0056 190 11/2/2026
1.0.0-preview-0055 81 11/2/2026
1.0.0-preview-0054 80 11/2/2026
Loading failed