internal DatabaseUpdateCheckResultsEventArgs(DatabaseUpdateCheckResults results) { if (results == null) { throw new ArgumentNullException("results"); } _results = results; }
internal void DoWork() { if (Operation == null) { throw new InvalidOperationException("Operation is null."); } // run... DatabaseUpdate update = DatabaseUpdate.Current; if (update == null) { throw new InvalidOperationException("update is null."); } // mbr - 28-09-2007 - added args... DatabaseUpdateArgs args = new DatabaseUpdateArgs(); switch (Type) { case DatabaseUpdateOperation.Check: DatabaseUpdateCheckResults results = update.Check(this.Operation, args); if (results == null) { throw new InvalidOperationException("results is null."); } this.OnCheckComplete(new DatabaseUpdateCheckResultsEventArgs(results)); break; case DatabaseUpdateOperation.Update: update.Update(this.Operation, args); this.OnUpdateComplete(); break; default: throw new NotSupportedException(string.Format("Cannot handle '{0}' ({1}).", Type, Type.GetType())); } }