ContextR.OpenFeature
1.0.0-rc.4
dotnet add package ContextR.OpenFeature --version 1.0.0-rc.4
NuGet\Install-Package ContextR.OpenFeature -Version 1.0.0-rc.4
<PackageReference Include="ContextR.OpenFeature" Version="1.0.0-rc.4" />
<PackageVersion Include="ContextR.OpenFeature" Version="1.0.0-rc.4" />
<PackageReference Include="ContextR.OpenFeature" />
paket add ContextR.OpenFeature --version 1.0.0-rc.4
#r "nuget: ContextR.OpenFeature, 1.0.0-rc.4"
#:package ContextR.OpenFeature@1.0.0-rc.4
#addin nuget:?package=ContextR.OpenFeature&version=1.0.0-rc.4&prerelease
#tool nuget:?package=ContextR.OpenFeature&version=1.0.0-rc.4&prerelease
ContextR.OpenFeature
OpenFeature.Hosting integration for ContextR.
Use this package to project ambient ContextR values into OpenFeature EvaluationContext
without manually repeating AddContext wiring in each application.
Install
dotnet add package ContextR.OpenFeature
Quick start
builder.Services
.AddContextR(ctx => ctx.Add<UserContext>())
.AddOpenFeature(feature => feature.UseContextR<UserContext>(o =>
{
o.SetTargetingKey(x => x.UserId);
o.SetContextKind("user");
o.Map(m => m.ByConvention("user."));
}));
Zero-config behavior
If you call UseContextR() without options:
builder.Services.AddOpenFeature(feature => feature.UseContextR());
the package still wires OpenFeature AddContext, but it does not add any mappings by default.
EvaluationContextis generated per DI resolution from the current ambient ContextR values.- Only configured mappings contribute attributes (
MapProperty,ByConvention, etc.). targetingKeyis not auto-inferred unless you set it viaSetTargetingKey(...).kindis not auto-inferred unless you set it viaSetContextKind(...).
So in strict zero-config mode, EvaluationContext is typically empty until you configure mapping and/or key/kind selectors.
See docs/ContextR.OpenFeature.md for all API variants and advanced examples.
| Product | Versions 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. |
-
net10.0
- ContextR (>= 1.0.0-rc.4)
- OpenFeature.Hosting (>= 2.11.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.4 | 19 | 3/5/2026 |