ManagedCode.Orleans.Graph
9.0.0
Prefix Reserved
dotnet add package ManagedCode.Orleans.Graph --version 9.0.0
NuGet\Install-Package ManagedCode.Orleans.Graph -Version 9.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="ManagedCode.Orleans.Graph" Version="9.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ManagedCode.Orleans.Graph" Version="9.0.0" />
<PackageReference Include="ManagedCode.Orleans.Graph" />
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 ManagedCode.Orleans.Graph --version 9.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ManagedCode.Orleans.Graph, 9.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.
#:package ManagedCode.Orleans.Graph@9.0.0
#: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=ManagedCode.Orleans.Graph&version=9.0.0
#tool nuget:?package=ManagedCode.Orleans.Graph&version=9.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Orleans Graph
Declare the grain-to-grain traffic you allow, block everything else, and see the graph in real time.
What You Get
- Fluent builder and attributes for defining permitted grain hops
- Incoming/outgoing filters that stop unauthorised calls before your code runs
- Deadlock detection with opt-in reentrancy
- Mermaid diagrams for both configured policy and live call history
Quick Start
// Silo
builder.AddOrleansGraph(
configureGraph: graph =>
{
graph.AddGrainTransition<IOrderGrain, IPaymentGrain>()
.Method(o => o.SubmitAsync(default!), p => p.ChargeAsync(default!))
.WithReentrancy()
.And()
.AllowClientCallGrain<IOrderGrain>();
});
// Client – attributes + defaults are enough
clientBuilder.AddOrleansGraph();
[AllowClientCall]
[AllowGrainCall(typeof(IPaymentGrain), AllowAllMethods = true, AllowReentrancy = true)]
public interface IOrderGrain : IGrainWithStringKey
{
Task SubmitAsync(Order dto);
}
[AllowSelfReentrancy]
[AllowGrainCall(typeof(IOrderGrain), SourceMethods = new[] { nameof(IPaymentGrain.ChargeAsync) }, TargetMethods = new[] { nameof(IOrderGrain.SubmitAsync) })]
public interface IPaymentGrain : IGrainWithStringKey
{
Task ChargeAsync(Payment payment);
}
public record Payment;
Visualise the Graph (Mermaid)
var manager = services.GetRequiredService<GrainTransitionManager>();
var policy = manager.GeneratePolicyMermaidDiagram();
var history = new CallHistory();
history.Push(new OutCall(null, null, typeof(IOrderGrain).FullName!, typeof(IPaymentGrain).FullName!, "SubmitAsync"));
history.Push(new InCall(null, null, typeof(IPaymentGrain).FullName!, "ChargeAsync"));
var live = manager.GenerateLiveMermaidDiagram(history);
--> means allowed, -.-> reentrant, ==> active edge with hits: N.
Runtime Guarantees
- Outgoing filter records every hop; incoming filter enforces the graph
- Deadlocks are detected unless the edge is marked reentrant
- Client → grain rules reuse the same builder/attribute API
Tests & Coverage
dotnet format Orleans.Graph.slnx
dotnet test Orleans.Graph.slnx --configuration Release -p:CollectCoverage=true -p:CoverletOutput=coverage/
Automated suites cover fluent policies, attribute discovery (AppDomain scan), attribute-only TestCluster, and graph internals (~86 % line / 81 % branch).
License
MIT – see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Microsoft.CodeAnalysis.CSharp (>= 4.14.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.14.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.10)
- Microsoft.Orleans.Runtime (>= 9.2.1)
- Microsoft.Orleans.Sdk (>= 9.2.1)
- Microsoft.Orleans.Serialization.Abstractions (>= 9.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.