Added migrations
This commit is contained in:
20
EventArguments/MigrationCompletedEventArgs.cs
Normal file
20
EventArguments/MigrationCompletedEventArgs.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace DbTools.EventArguments {
|
||||
public delegate void MigrationCompletedEventHandler(object sender, MigrationCompletedEventArgs e);
|
||||
|
||||
public class MigrationCompletedEventArgs : EventArgs {
|
||||
public string MigrationName { get; set; }
|
||||
public bool WasSuccessful { get; set; }
|
||||
public Exception Error { get; set; }
|
||||
public int Remaining { get; set; }
|
||||
|
||||
public MigrationCompletedEventArgs() { }
|
||||
public MigrationCompletedEventArgs(string migrationName, int remaining, Exception error = null, bool wasSuccessful = true) {
|
||||
MigrationName = migrationName;
|
||||
WasSuccessful = error != null ? false : wasSuccessful;
|
||||
Error = error;
|
||||
Remaining = remaining;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
EventArguments/MigrationProgressEventArgs.cs
Normal file
23
EventArguments/MigrationProgressEventArgs.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace DbTools.EventArguments {
|
||||
public delegate void MigrationProgressEventHandler(object sender, MigrationProgressEventArgs e);
|
||||
|
||||
public class MigrationProgressEventArgs : EventArgs {
|
||||
public string StatusText { get; set; }
|
||||
public int Total { get; set; }
|
||||
public int Pending { get; set; }
|
||||
public int Successful { get; set; }
|
||||
public int Failed { get; set; }
|
||||
|
||||
public MigrationProgressEventArgs() { }
|
||||
|
||||
public MigrationProgressEventArgs(int total, int pending, int successful, int failed, string statusText = "") {
|
||||
Total = total;
|
||||
Pending = pending;
|
||||
Successful = successful;
|
||||
Failed = failed;
|
||||
StatusText = statusText;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
EventArguments/MigrationStartedEventArgs.cs
Normal file
16
EventArguments/MigrationStartedEventArgs.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace DbTools.EventArguments {
|
||||
public delegate void MigrationStartedEventHandler(object sender, MigrationStartedEventArgs e);
|
||||
|
||||
public class MigrationStartedEventArgs : EventArgs {
|
||||
public string MigrationName { get; set; }
|
||||
public int Remaining { get; set; }
|
||||
|
||||
public MigrationStartedEventArgs() { }
|
||||
public MigrationStartedEventArgs(string migrationName, int remaining) {
|
||||
MigrationName = migrationName;
|
||||
Remaining = remaining;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user