-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02c29a9
commit 645d270
Showing
25 changed files
with
353 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ManagedCode.Orleans.Graph/Extensions/OrleansCleintGraphExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using ManagedCode.Orleans.Graph.Filters; | ||
using ManagedCode.Orleans.Graph.Models; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Orleans.Hosting; | ||
|
||
namespace ManagedCode.Orleans.Graph.Extensions; | ||
|
||
public static class OrleansCleintGraphExtensions | ||
{ | ||
public static IClientBuilder AddOrleansGraph(this IClientBuilder builder) | ||
{ | ||
return builder.AddOrleansGraph(_ => { }); | ||
} | ||
|
||
|
||
public static IClientBuilder AddOrleansGraph(this IClientBuilder builder, Action<GraphCallFilterConfig> config) | ||
{ | ||
var graphCallFilterConfig = new GraphCallFilterConfig(); | ||
config.Invoke(graphCallFilterConfig); | ||
builder.Services.AddSingleton(graphCallFilterConfig); | ||
|
||
builder.AddOutgoingGrainCallFilter<GraphOutgoingGrainCallFilter>(); | ||
return builder; | ||
} | ||
|
||
public static IClientBuilder CreateGraph(this IClientBuilder builder, Action<GrainGraphManager> graph) | ||
{ | ||
var grainGraph = new GrainGraphManager(); | ||
graph(grainGraph); | ||
builder.ConfigureServices(services => services.AddSingleton(grainGraph)); | ||
return builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.