示例#1
0
        public Task Handle(AksNewRegionAvailableEvent notification, CancellationToken cancellationToken)
        {
            string tweet = BuildTweetMessage(notification);

            twitterApi.PostTweet(new TweetMessage(tweet));

            return(Task.CompletedTask);
        }
示例#2
0
 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}");
     }
 }
示例#3
0
 public async Task Handle(AksNewRegionAvailableEvent notification, CancellationToken cancellationToken)
 {
     await SaveInStorage(notification);
 }