internal ClientActorSystem( Assembly[] assemblies, IServiceProvider serviceProvider, IActorRefMiddleware middleware = null) : base(assemblies, serviceProvider, middleware) { grainFactory = serviceProvider.GetService <IGrainFactory>(); }
protected ActorSystem(Assembly[] assemblies, IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; this.grainFactory = serviceProvider.GetService <IGrainFactory>(); this.actorRefMiddleware = serviceProvider.GetService <IActorRefMiddleware>() ?? DefaultActorRefMiddleware.Instance; Register(assemblies); }
internal ClusterActorSystem( Assembly[] assemblies, IServiceProvider serviceProvider, ActorMiddlewarePipeline pipeline, IActorRefMiddleware middleware = null) : base(assemblies, serviceProvider, middleware) { Register(pipeline, assemblies); }
protected ActorSystem(Assembly[] assemblies, IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; this.grainFactory = serviceProvider.GetService <IGrainFactory>(); this.actorRefMiddleware = serviceProvider.GetService <IActorRefMiddleware>(); this.streamRefMiddleware = serviceProvider.GetService <IStreamRefMiddleware>(); Register(assemblies); }
/// <summary> /// Registers global <see cref="ActorRef"/> middleware (interceptor) /// </summary> /// <param name="middleware">The middleware.</param> public OrleankkaClientOptions ActorRefMiddleware(IActorRefMiddleware middleware) { Requires.NotNull(middleware, nameof(middleware)); if (this.middleware != null) throw new InvalidOperationException("ActorRef middleware has been already registered"); this.middleware = middleware; return this; }
/// <summary> /// Registers direct client <see cref="ActorRef"/> middleware (interceptor) /// </summary> /// <param name="middleware">The middleware.</param> public OrleankkaClusterOptions DirectClientActorRefMiddleware(IActorRefMiddleware middleware) { Requires.NotNull(middleware, nameof(middleware)); if (directClientMiddleware != null) { throw new InvalidOperationException("ActorRef middleware for direct client has been already registered"); } directClientMiddleware = middleware; return(this); }
public HttpActorSystem(HttpClient client, JsonSerializerOptions serializer, ActorRouteMapper mapper, IActorRefMiddleware middleware = null) { if (!client.BaseAddress.AbsoluteUri.EndsWith("/")) { throw new InvalidOperationException("The base address should end with /"); } this.mapper = mapper; this.client = client; this.serializer = serializer; this.middleware = middleware ?? DefaultActorRefMiddleware.Instance; }
internal ActorRef(ActorPath path, IActorGrain endpoint, IActorRefMiddleware middleware) : this(path) { this.endpoint = endpoint; this.middleware = middleware; }
protected ActorRefMiddleware(IActorRefMiddleware next = null) => this.next = next ?? DefaultActorRefMiddleware.Instance;