Exemple #1
0
        protected override async Task ExecuteAsync(object parameter)
        {
            var configuration = parameter as IDocumentDbAdapterConfiguration;

            if (configuration == null)
            {
                return;
            }

            await probeClient.TestConnection(configuration.ConnectionString, configuration.ConnectionMode);

            MessageBox.Show(
                Resources.TestConnectionSuccessMessage,
                Resources.TestConnectionResultTitle,
                MessageBoxButton.OK, MessageBoxImage.Information);
        }
        protected override async Task ExecuteAsync(object parameter)
        {
            var configuration = parameter as IDocumentDbAdapterConfiguration;

            if (configuration == null)
            {
                return;
            }

            try
            {
                await probeClient.TestConnection(configuration.ConnectionString, configuration.ConnectionMode, configuration.IgnoreSSLCertErrors);
            }
            catch (Exception ex)
            {
                throw;
            }

            MessageBox.Show(
                Resources.TestConnectionSuccessMessage,
                Resources.TestConnectionResultTitle,
                MessageBoxButton.OK, MessageBoxImage.Information);
        }