public Task Handle(AksNewRegionAvailableEvent notification, CancellationToken cancellationToken) { string tweet = BuildTweetMessage(notification); twitterApi.PostTweet(new TweetMessage(tweet)); return(Task.CompletedTask); }
public string BuildTweetMessage(AksNewRegionAvailableEvent notification) { if (notification.NotificationType.IsPreview) { return($"New region {notification.Region} available in Azure supporting AKS preview version {notification.LatestVersion}" + $"{Environment.NewLine}" + $"The following preview versions are available: {notification.PreviewVersions}" + $"{Environment.NewLine}" + $"{hashTags}"); } else { return($"New region {notification.Region} available in Azure supporting AKS version {notification.LatestVersion}" + $"{Environment.NewLine}" + $"{hashTags}"); } }
public async Task Handle(AksNewRegionAvailableEvent notification, CancellationToken cancellationToken) { await SaveInStorage(notification); }