Skip to content
Oclavex is in private preview, open to existing MonetizeIt users. New users who would like to evaluate Oclavex before the public launch can request access at info@revenusion.com.

.NET SDK — feature blocks & architecture

The SDK is a minimal mandatory core plus a set of optional, stackable feature blocks. You assemble a client by taking the core and adding only the blocks you need: a connected desktop app takes the online transport and metering blocks; an air-gapped device takes offline activation and a file cache instead.

Blocks are described here by ID, responsibility and dependencies, not by .NET types alone. That makes the model language-neutral: a non-.NET client — the C/C++ interop, say — can implement a deliberate subset (license validation and an offline cache, with no HTTP stack at all) and still be conformant. The .NET packages are one implementation of this model; Client.OfflineStore is one example of an add-on stacking on the core.

Every optional block has a defined absent behavior — when a block is missing, the SDK either runs in a known reduced state or fails at once with an error that names the missing setup. Those rules are in Spec rules.

Each block has a stable ID, a responsibility, the blocks it requires, and the current .NET types and package that implement it.

Block Requires .NET types Package
CORE-VALIDATE (mandatory) — SecureLicenseTokenValidation, LicenseClock, LicenseClaims, RsaPublicKey, ILicensePublicKeyProvider Client.LicenseConsumer
CORE-SESSION CORE-VALIDATE LicenseService, LicenseSession, LicenseClient, LicenseClientBuilder, LicenseRefreshScheduler Client.LicenseConsumer
IDENTITY-BINDING — INodeIdProvider, FingerprintDigest, Sha256FingerprintSigner, IActivationCodeProvider, IApplicationInfoProvider Client.LicenseConsumer
STORE-MEMORY / STORE-FILE CORE-VALIDATE InMemoryLicenseStore, LicenseFileStore, AtomicFile Client.LicenseConsumer
METER-RECORD (+ METER-RECORD-FILE) CORE-SESSION ITransactionStore, InMemoryTransactionStore, FileTransactionStore, UsageReporter, ScheduledUsageReporter Client.LicenseConsumer
METER-UPLOAD METER-RECORD + TRANSPORT-HTTP ITransactionProcessor, TransactionsToMonetizeServerConnector, TransactionUploadScheduler Client.LicenseConsumer (ITransactionProcessor, TransactionUploadScheduler) + Client.LicenseConsumer.Connected (the connector)
METER-BALANCE TRANSPORT-HTTP IAssetConsumption, AssetBalanceConsumption, NullAssetConsumption Client.LicenseConsumer (IAssetConsumption, NullAssetConsumption) + Connected (AssetBalanceConsumption)
ENTITLEMENTS CORE-VALIDATE IFeatureValidation, FeatureValidation Client.LicenseConsumer
TRANSPORT-HTTP CORE-SESSION HttpLicenseProvider (activation path); HttpConnector + Client.Provisioning Connected
OFFLINE-ACTIVATION CORE-VALIDATE, IDENTITY-BINDING, STORE-FILE request / response / receipt exchange Client.OfflineStore
HOSTING-ASPNET / HOSTING-MULTITENANT TRANSPORT-HTTP DI root, hosted services, OIDC, OTel / per-tenant options that work with Finbuckle Client.AspNetCore
ADMIN TRANSPORT-HTTP provider-side management APIs Client.Admin + Client.Provisioning
  • CORE-VALIDATE — verifies the JWS RS256 license token against a pinned public key, with a monotonic clock, the validity window and license claims. This is the trust root.
  • CORE-SESSION — the acquire / cache / refresh lifecycle: memory cache, then store, then provider, falling back to an older stored license when the provider fails; single-flight acquisition gates; and the client builder.
  • IDENTITY-BINDING — node-id and fingerprint providers, the license-key source and app identity: the inputs that bind a license to a machine and application.
  • STORE-MEMORY / STORE-FILE — the license cache: in-process, or a durable atomic-write file cache.
  • METER-RECORD — local usage buffering; METER-RECORD-FILE adds a durable file log, HMAC-chained and tamper-evident when you supply an integrity key.
  • METER-UPLOAD — drains buffered usage to the server on a schedule.
  • METER-BALANCE — server-side asset consumption: a non-binding check, and the commit that binds.
  • ENTITLEMENTS — feature and entitlement checks over license claims.
  • TRANSPORT-HTTP — online activation and refresh, with one retry after a 401. It holds the AnonymousAuthentication and ClientCredentialsAuthentication providers. The ASP.NET host adds a circuit breaker and retries on transient faults.
  • OFFLINE-ACTIVATION — air-gapped activation through a request / response / receipt exchange.
  • HOSTING-ASPNET / HOSTING-MULTITENANT — the application host: DI root, hosted services, OIDC, OpenTelemetry, and per-tenant options that work with Finbuckle (the package does not depend on it).
  • ADMIN — provider-side management APIs.
  • CORE-VALIDATE is mandatory and must be Full in every conformant client. It is the license trust root.
  • Every other block is optional. A client declares which blocks it implements, rated Full / Partial / None per block.
  • Each omitted block has a defined absent behavior:
    • No provider present → no refresh scheduler runs; the client operates from the store only.
    • TRANSPORT-HTTP absent → store-only activation (licenses come from the cache, not the network).
    • METER-BALANCE absent → NullAssetConsumption is used: every consumption call throws an InvalidOperationException saying no Oclavex server is configured.
    • METER-UPLOAD absent → OFFLINE-ACTIVATION receipt export/import is the alternative drain for METER-RECORD: buffered usage leaves the machine through the receipt exchange instead of an HTTP upload.

The blocks group into three tiers. Add-ons depend on the core (Admin on the foundation directly), and the core on the foundation — never the reverse. The core’s only foundation dependency is the wire DTO contracts; the HttpConnector transport enters with the Connected add-on, which is what keeps the core HTTP-free.

opt-in add-on packages Connected HTTP · upload · balance OfflineStore air-gapped activation ASP.NET Host DI · hosting · OpenTelemetry Admin provider management APIs Core package netstandard2.0 · HTTP-free validate · session · identity store · metering · entitlements depends on Foundation HttpConnector · wire DTO contracts
  • Core package — HTTP-free, targets netstandard2.0 for broad reach (and net10.0). Holds CORE-VALIDATE, CORE-SESSION, IDENTITY-BINDING, STORE-MEMORY / STORE-FILE, METER-RECORD and ENTITLEMENTS. A client built from the core alone validates licenses, binds identity, caches to memory or disk, records usage locally and enforces entitlements — with no network stack.
  • Add-on packages — opt-in. Connected (TRANSPORT-HTTP + METER-UPLOAD + METER-BALANCE), OfflineStore (OFFLINE-ACTIVATION) and ASP.NET Host (HOSTING-ASPNET / HOSTING-MULTITENANT) stack on the core; Admin (ADMIN) builds on the foundation directly.
  • Foundation — shared low-level pieces every online tier builds on: the HttpConnector transport and the wire DTO contracts.

A profile is a named assembly of blocks. The matrix rates each block per profile as Full, Partial or None; where a block ships as an add-on, the cell names the package that provides it.

dotnet-min dotnet-desktop dotnet-full cpp-embedded cpp-connected (preview) (preview) CORE-VALIDATE CORE-SESSION IDENTITY-BINDING STORE-MEMORY STORE-FILE METER-RECORD METER-UPLOAD METER-BALANCE ENTITLEMENTS TRANSPORT-HTTP OFFLINE-ACTIVATION HOSTING-ASPNET/MT ADMIN Full Full Full Full Full Full Full Full Partial Full Full Full Full Partial Full Full Full Full — Full Full Full Full Full Full Full Full Full — Full — Connected Connected — Full — Connected Connected — Full Full Full Full Full Full — Connected Connected — Full OfflineStore OfflineStore OfflineStore Partial Partial — — Full — — — — Admin — — Full Partial / provided by the named add-on package — None (see the absent-behavior rules)
  • dotnet-min — the core package only, no HTTP. Validation, session, identity, both stores, metering and entitlements are Full; offline activation is available by adding OfflineStore. No upload, balance, HTTP transport, hosting or admin.
  • dotnet-desktop — core + Connected. Adds online activation/refresh, usage upload and server-side balance.
  • dotnet-full — core + Connected + ASP.NET Host (and Admin for provider-side management). Every block is Full.
  • cpp-embedded — the lean subset, liboclavex (built from source in the SDK repository; no binary is published yet) configured without a server URL (store-only). The library is a preview (0.x): its ABI may change between 0.x releases. CORE-VALIDATE Full; STORE-FILE and ENTITLEMENTS Full; OFFLINE-ACTIVATION Partial (it imports responses and receipts and writes the usage file, but does not write the activation request); no HTTP transport, hosting or admin. Being the same binary as cpp-connected, it exceeds the profile’s minimum in places (session, identity and local METER-RECORD work offline too).
  • cpp-connected — cpp-embedded plus the online path: session, identity, all metering and HTTP transport are Full; offline activation stays Partial; no hosting or admin. Implemented by compiling the .NET consumer core with Native AOT behind the C ABI in the SDK repository’s dotnet/capi (oclavex.h), consumed from C++ via the header-only RAII wrapper in cpp/capi.