public ConnectorEndpointBuilder( IEndpointRouteBuilder builder, string areaName, AbstractConnector connector) : base(builder, areaName, connector.Module.Conventions) { ModuleType = connector.Module.GetType(); }
private async void btnTestarConexao_Click(object sender, RoutedEventArgs e) { AbstractConnector connector = ConnectorFactory.CreateConnector(_ConfiguracoesSistema.TipoDeBase, _ConfiguracoesSistema); MostrarAguarde(progressTestarConexao); btnTestarConexao.Visibility = Visibility.Collapsed; (bool Success, string Message)resposta; try { resposta = await connector.TryConnection(); } finally { EsconderAguarde(progressTestarConexao); btnTestarConexao.Visibility = Visibility.Visible; } if (!resposta.Success) { System.Windows.MessageBox.Show(resposta.Message, "Ocorreu um erro", MessageBoxButton.OK, MessageBoxImage.Error); } }