public async Task <ComponentStatus> EvaluateAsync(string component, CloudBlobClient client, Func <CloudBlobClient, Task <bool> > fn)
        {
            var details = new Dictionary <string, object>
            {
                ["Uri"] = client.BaseUri
            };

            return(await fn(client)
                ? ComponentStatus.Up(component, details)
                : ComponentStatus.Down(component, details));
        }
Beispiel #2
0
        public async Task <ComponentStatus> EvaluateSubscriptionsAsync(string component, NamespaceManager namespaceManager, string topicPath, Func <IEnumerable <SubscriptionDescription>, bool> fn)
        {
            var subscriptions = await namespaceManager.GetSubscriptionsAsync(topicPath);

            var details = new Dictionary <string, object>
            {
                ["Uri"]       = namespaceManager.Address,
                ["TopicPath"] = topicPath
            };

            return(fn(subscriptions)
                ? ComponentStatus.Up(component, details)
                : ComponentStatus.Down(component, details));
        }