public override bool TryGetProvider(string connectionString, out IConnectionProvider provider, out Exception exception)
 {
     try
     {
         var _ = new SqlCeConnectionStringBuilder(connectionString);
         provider = new SqlCe40ConnectionProvider();
         provider.SetConnectionString(connectionString);
         exception = null;
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         provider = null;
         return false;
     }
 }
Ejemplo n.º 2
0
 public override bool TryGetProvider(string connectionString, out IConnectionProvider provider, out Exception exception)
 {
     try
     {
         var _ = new SqlCeConnectionStringBuilder(connectionString);
         provider = new SqlCe40ConnectionProvider();
         provider.SetConnectionString(connectionString);
         exception = null;
         return(true);
     }
     catch (Exception ex)
     {
         exception = ex;
         provider  = null;
         return(false);
     }
 }