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)); } }
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)); } }