public async Task <bool> ApplicationExistsAsync(string applicationInstanceName, CancellationToken token) { Uri appName = new Uri(applicationInstanceName); ApplicationList applications = await fabricClient.QueryManager.GetApplicationListAsync(appName, TimeSpan.FromSeconds(30), token); return(applications.Any(x => x.ApplicationName == appName)); }