예제 #1
0
파일: ANOTransformer.cs 프로젝트: rkm/RDMP
 public static void ConfirmDependencies(DiscoveredDatabase database, ICheckNotifier notifier)
 {
     try
     {
         if (database.DiscoverStoredprocedures().Any(p => p.Name.Equals(SubstitutionStoredprocedure)))
         {
             notifier.OnCheckPerformed(new CheckEventArgs("successfully found " + SubstitutionStoredprocedure + " on " + database, CheckResult.Success, null));
         }
         else
         {
             notifier.OnCheckPerformed(new CheckEventArgs("Failed to find " + SubstitutionStoredprocedure + " on " + database, CheckResult.Fail, null));
         }
     }
     catch (Exception e)
     {
         notifier.OnCheckPerformed(new CheckEventArgs(
                                       "Exception occurred when trying to find stored procedure " + SubstitutionStoredprocedure +
                                       " on " + database, CheckResult.Fail, e));
     }
 }
예제 #2
0
        public static void ConfirmDependencies(DiscoveredDatabase dbInfo, ICheckNotifier notifier)
        {
            try
            {
                DiscoveredStoredprocedure[] procedures = dbInfo.DiscoverStoredprocedures();

                if (procedures.Any(p => p.Name.Equals(IdentifierDumpCreatorStoredprocedure)))
                {
                    notifier.OnCheckPerformed(new CheckEventArgs("Found stored procedure " + IdentifierDumpCreatorStoredprocedure +
                                                                 " on " + dbInfo, CheckResult.Success, null));
                }
                else
                {
                    notifier.OnCheckPerformed(new CheckEventArgs("Connected successfully to server " + dbInfo + " but did not find the stored procedure " + IdentifierDumpCreatorStoredprocedure +
                                                                 " in the database (Possibly the ExternalDatabaseServer is not an IdentifierDump database?)", CheckResult.Fail, null));
                }
            }
            catch (Exception e)
            {
                notifier.OnCheckPerformed(new CheckEventArgs(
                                              "Exception occurred when trying to find stored procedure " + IdentifierDumpCreatorStoredprocedure +
                                              " on " + dbInfo, CheckResult.Fail, e));
            }
        }