You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
using OpenDBDiff.Abstractions.Schema.Events;
|
|
using OpenDBDiff.Abstractions.Schema.Model;
|
|
using OpenDBDiff.Abstractions.Ui;
|
|
using OpenDBDiff.SqlServer.Schema.Generates;
|
|
using OpenDBDiff.SqlServer.Schema.Options;
|
|
|
|
namespace OpenDBDiff.SqlServer.Ui
|
|
{
|
|
public class SQLServerGenerator : IGenerator
|
|
{
|
|
private readonly Generate Generate;
|
|
|
|
public event ProgressEventHandler.ProgressHandler OnProgress;
|
|
|
|
public SQLServerGenerator(string connectionString, IOption option)
|
|
{
|
|
this.Generate = new Generate()
|
|
{
|
|
ConnectionString = connectionString,
|
|
Options = new SqlOption(option)
|
|
};
|
|
this.Generate.OnProgress += new ProgressEventHandler.ProgressHandler(args =>
|
|
{
|
|
if (OnProgress != null)
|
|
OnProgress.Invoke(args);
|
|
});
|
|
|
|
}
|
|
|
|
public int GetMaxValue()
|
|
{
|
|
return Generate.MaxValue;
|
|
}
|
|
|
|
public IDatabase Process()
|
|
{
|
|
return this.Generate.Process();
|
|
}
|
|
}
|
|
}
|