private async Task SubscribeStoriesAsync() { var stream = _client.StreamStories(new SubscribeStories()); while (await stream.ResponseStream.MoveNext(CancellationToken.None)) { var story = stream.ResponseStream.Current; StoryCreated?.Invoke(new StoryDto { Id = story.Id, Title = story.Title, CreatedAt = DateTime.Parse(story.CreatedAt), Author = new AuthorDto { Id = Guid.Parse(story.Author.Id), Name = story.Author.Name }, Tags = story.Tags }); } }
public void When(StoryCreated storyCreated) { StoryId = storyCreated.StoryId; _taskReferences = new List <Guid>(); }