protected Actor(string id, IActorRuntime runtime) { Requires.NotNull(runtime, "runtime"); Requires.NotNullOrWhitespace(id, "id"); Id = id; Runtime = runtime; }
/// <inheritdoc /> public ClientRef ClientOf(string path) { Requires.NotNullOrWhitespace(path, nameof(path)); var endpoint = ClientEndpoint.Proxy(path, grainFactory); return(new ClientRef(endpoint)); }
protected Actor(string id, IActorSystem system) { Requires.NotNull(system, "system"); Requires.NotNullOrWhitespace(id, "id"); Id = id; System = system; }
public static StreamPath From(string provider, string id) { Requires.NotNull(provider, nameof(provider)); Requires.NotNull(id, nameof(id)); Requires.NotNullOrWhitespace(id, nameof(id)); return new StreamPath(provider, id); }
protected Actor(string id, IActorRuntime runtime) { Requires.NotNull(runtime, nameof(runtime)); Requires.NotNullOrWhitespace(id, nameof(id)); Id = id; Runtime = runtime; }
protected Actor(string id, IActorRuntime runtime, Dispatcher dispatcher = null) : this() { Requires.NotNull(runtime, nameof(runtime)); Requires.NotNullOrWhitespace(id, nameof(id)); Runtime = runtime; Dispatcher = dispatcher ?? ActorType.Dispatcher(GetType()); Path = GetType().ToActorPath(id); }
public ActorTypeCodeAttribute(string code) { Requires.NotNullOrWhitespace(code, "code"); if (code.Contains(ActorPath.Separator[0])) { throw new ArgumentException("Actor type code cannot contain path separator: " + code); } Code = code; }
public ActorTypeAttribute(string name) { Requires.NotNullOrWhitespace(name, nameof(name)); if (name.Contains(ActorPath.Separator[0])) { throw new ArgumentException($"Actor type name cannot contain path separator: {name}"); } Name = name; }
StreamSubscriptionSpecification(Type actor, string provider, Func <string, string> matcher, Func <object, string> selector = null, Func <object, bool> filter = null) { Requires.NotNullOrWhitespace(provider, nameof(provider)); Requires.NotNull(matcher, nameof(matcher)); Type = ActorTypeName.Of(actor); Provider = provider; this.matcher = matcher; this.selector = selector; this.filter = filter ?? (x => true); }
public void Register(string name, IActorInvoker invoker) { Requires.NotNullOrWhitespace(name, nameof(name)); Requires.NotNull(invoker, nameof(invoker)); if (invokers.ContainsKey(name)) { throw new InvalidOperationException($"Invoker with name '{name}' is already registered"); } invokers.Add(name, invoker); }
public InvokerAttribute(string name) { Requires.NotNullOrWhitespace(name, nameof(name)); Name = name; }
public AutorunAttribute(string id) { Requires.NotNullOrWhitespace(id, nameof(id)); Id = id; }
public ReentrantAttribute(string callback) { Requires.NotNullOrWhitespace(callback, nameof(callback)); this.callback = callback; }