/// <summary> /// Publishes a message to a resources with indexes. /// </summary> /// <param name="resourceUriString">Unique URI that identifies the resource.</param> /// <param name="message">Message to publishes.</param> /// <param name="indexes">Indexes used to filter subscriptions to subset.</param> /// <returns></returns> public async Task PublishAsync(string resourceUriString, EventMessage message, List <KeyValuePair <string, string> > indexes) { IPiSystem resource = GetPiSystem(resourceUriString); await resource.PublishAsync(message, indexes); }
private async void Sink_OnResponse(object sender, EventSinkResponseArgs e) { IPiSystem pisystem = GrainFactory.GetGrain <IPiSystem>(e.Message.ResourceUri); await pisystem.PublishAsync(e.Message); }
/// <summary> /// Publishes a message to a resource. /// </summary> /// <param name="resourceUriString">Unique URI that identifies the resource.</param> /// <param name="message">Message to publish.</param> /// <returns></returns> public async Task PublishAsync(string resourceUriString, EventMessage message) { IPiSystem resource = GetPiSystem(resourceUriString); await resource.PublishAsync(message); }