public IEtlRunner Get(IEtl etl) { var factory = new SsisEtlRunnerFactory(); var runner = factory.Get(etl); return(runner); }
public EtlCatalogRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlCatalogRunner"; if (string.IsNullOrEmpty(Etl.Server)) { throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); } if (string.IsNullOrEmpty(Etl.Catalog)) { throw new ArgumentNullException("Catalog", string.Format(argumentNullExceptionSentence, "Catalog")); } if (string.IsNullOrEmpty(Etl.Folder)) { throw new ArgumentNullException("Folder", string.Format(argumentNullExceptionSentence, "Folder")); } if (string.IsNullOrEmpty(Etl.Project)) { throw new ArgumentNullException("Project", string.Format(argumentNullExceptionSentence, "Project")); } if (string.IsNullOrEmpty(Etl.Name)) { throw new ArgumentNullException("Name", string.Format(argumentNullExceptionSentence, "Name")); } }
public IEtlRunner Get(IEtl etl) { var directory = AssemblyDirectory; var filename = string.Format("NBi.Core.{0}.dll", etl.Version); var filepath = string.Format("{0}\\{1}", directory, filename); if (!File.Exists(filepath)) { throw new InvalidOperationException(string.Format("Can't find the dll for version '{0}' in '{1}'. NBi was expecting to find a dll named '{2}'.", etl.Version, directory, filename)); } var assembly = Assembly.LoadFrom(filepath); var types = assembly.GetTypes() .Where(m => m.IsClass && m.GetInterface("IEtlRunnerFactory") != null); if (types.Count() == 0) { throw new InvalidOperationException(string.Format("Can't find a class implementing 'IEtlRunnerFactory' in '{0}'.", assembly.FullName)); } if (types.Count() > 1) { throw new InvalidOperationException(string.Format("Found more than one class implementing 'IEtlRunnerFactory' in '{0}'.", assembly.FullName)); } var etlRunnerFactory = Activator.CreateInstance(types.ElementAt(0)) as IEtlRunnerFactory; var etlRunner = etlRunnerFactory.Get(etl); return(etlRunner); }
public EtlDtsWindowsRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsWindowsRunner"; if (string.IsNullOrEmpty(Etl.Server)) throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); }
public EtlDtsWindowsRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsWindowsRunner"; if (string.IsNullOrEmpty(Etl.Server)) { throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); } }
protected override Package Load(IEtl etl, Application app) { var packageName = etl.Path + etl.Name; if (!packageName.ToLower().EndsWith(".dtsx")) packageName += ".dtsx"; var events = new PackageEvents(); var package = app.LoadPackage(packageName, events); return package; }
public EtlDtsRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsRunner"; if (string.IsNullOrEmpty(Etl.Path)) throw new ArgumentNullException("Path", string.Format(argumentNullExceptionSentence, "Path")); if (string.IsNullOrEmpty(Etl.Name)) throw new ArgumentNullException("Name", string.Format(argumentNullExceptionSentence, "Name")); }
public IEtlRunner Get(IEtl etl) { if (string.IsNullOrEmpty(etl.Server)) return new EtlFileRunner(etl); else if (!string.IsNullOrEmpty(etl.Catalog) || !string.IsNullOrEmpty(etl.Folder) || !string.IsNullOrEmpty(etl.Project)) return new EtlCatalogRunner(etl); else if (string.IsNullOrEmpty(etl.UserName)) return new EtlDtsWindowsRunner(etl); else return new EtlDtsSqlServerRunner(etl); }
protected override Package Load(IEtl etl, Application app) { var server = etl.Server.Replace(" ", ""); if(server.ToLower()=="(local)") server="."; var packageName = etl.Path + etl.Name; var events = new PackageEvents(); var package = app.LoadFromDtsServer(packageName, server, events); return package; }
public EtlDtsSqlServerRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsSqlServerRunner"; if (string.IsNullOrEmpty(Etl.Server)) throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); if (string.IsNullOrEmpty(Etl.UserName)) throw new ArgumentNullException("UserName", string.Format(argumentNullExceptionSentence, "UserName")); if (string.IsNullOrEmpty(Etl.Password)) throw new ArgumentNullException("Password", string.Format(argumentNullExceptionSentence, "Password")); }
public EtlDtsRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsRunner"; if (string.IsNullOrEmpty(Etl.Path)) { throw new ArgumentNullException("Path", string.Format(argumentNullExceptionSentence, "Path")); } if (string.IsNullOrEmpty(Etl.Name)) { throw new ArgumentNullException("Name", string.Format(argumentNullExceptionSentence, "Name")); } }
protected override Package Load(IEtl etl, Application app) { var packageName = etl.Path + etl.Name; if (!packageName.ToLower().EndsWith(".dtsx")) { packageName += ".dtsx"; } var events = new PackageEvents(); var package = app.LoadPackage(packageName, events); return(package); }
protected override Package Load(IEtl etl, Application app) { var server = etl.Server.Replace(" ", ""); if(server.ToLower()=="(local)") server="."; var packageName = etl.Path + etl.Name; if (!packageName.ToLower().EndsWith(".dtsx")) packageName += ".dtsx"; var events = new PackageEvents(); var package = app.LoadFromSqlServer(packageName, server, etl.UserName, etl.Password, events); return package; }
protected override Package Load(IEtl etl, Application app) { var server = etl.Server.Replace(" ", ""); if (server.ToLower() == "(local)") { server = "."; } var packageName = etl.Path + etl.Name; var events = new PackageEvents(); var package = app.LoadFromDtsServer(packageName, server, events); return(package); }
public EtlCatalogRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlCatalogRunner"; if (string.IsNullOrEmpty(Etl.Server)) throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); if (string.IsNullOrEmpty(Etl.Catalog)) throw new ArgumentNullException("Catalog", string.Format(argumentNullExceptionSentence, "Catalog")); if (string.IsNullOrEmpty(Etl.Folder)) throw new ArgumentNullException("Folder", string.Format(argumentNullExceptionSentence, "Folder")); if (string.IsNullOrEmpty(Etl.Project)) throw new ArgumentNullException("Project", string.Format(argumentNullExceptionSentence, "Project")); if (string.IsNullOrEmpty(Etl.Name)) throw new ArgumentNullException("Name", string.Format(argumentNullExceptionSentence, "Name")); }
public IEtlRunner Get(IEtl etl) { if (string.IsNullOrEmpty(etl.Server)) { return(new EtlFileRunner(etl)); } else if (!string.IsNullOrEmpty(etl.Catalog) || !string.IsNullOrEmpty(etl.Folder) || !string.IsNullOrEmpty(etl.Project)) { return(new EtlCatalogRunner(etl)); } else if (string.IsNullOrEmpty(etl.UserName)) { return(new EtlDtsWindowsRunner(etl)); } else { return(new EtlDtsSqlServerRunner(etl)); } }
public EtlDtsSqlServerRunner(IEtl etl) : base(etl) { var argumentNullExceptionSentence = "You must specify a value for parameter '{0}' when using an EtlDtsSqlServerRunner"; if (string.IsNullOrEmpty(Etl.Server)) { throw new ArgumentNullException("Server", string.Format(argumentNullExceptionSentence, "Server")); } if (string.IsNullOrEmpty(Etl.UserName)) { throw new ArgumentNullException("UserName", string.Format(argumentNullExceptionSentence, "UserName")); } if (string.IsNullOrEmpty(Etl.Password)) { throw new ArgumentNullException("Password", string.Format(argumentNullExceptionSentence, "Password")); } }
protected override Package Load(IEtl etl, Application app) { var server = etl.Server.Replace(" ", ""); if (server.ToLower() == "(local)") { server = "."; } var packageName = etl.Path + etl.Name; if (!packageName.ToLower().EndsWith(".dtsx")) { packageName += ".dtsx"; } var events = new PackageEvents(); var package = app.LoadFromSqlServer(packageName, server, etl.UserName, etl.Password, events); return(package); }
public IEtlRunner Get(IEtl etl) { if (string.IsNullOrEmpty(etl.Server)) { return(new EtlFileRunner(etl)); } #if !SqlServer2008R2 else if (!string.IsNullOrEmpty(etl.Catalog)) { return(new EtlCatalogRunner(etl)); } #endif else if (string.IsNullOrEmpty(etl.UserName)) { return(new EtlDtsWindowsRunner(etl)); } else { return(new EtlDtsSqlServerRunner(etl)); } }
public IEtlRunner Get(IEtl etl) { var directory = AssemblyDirectory; var filename = string.Format("NBi.Core.{0}.dll", etl.Version); var filepath = string.Format("{0}\\{1}", directory, filename); if (!File.Exists(filepath)) throw new InvalidOperationException(string.Format("Can't find the dll for version '{0}' in '{1}'. NBi was expecting to find a dll named '{2}'.", etl.Version, directory, filename)); var assembly = Assembly.LoadFrom(filepath); var types = assembly.GetTypes() .Where(m => m.IsClass && m.GetInterface("IEtlRunnerFactory") != null); if (types.Count()==0) throw new InvalidOperationException(string.Format("Can't find a class implementing 'IEtlRunnerFactory' in '{0}'.", assembly.FullName)); if (types.Count() > 1) throw new InvalidOperationException(string.Format("Found more than one class implementing 'IEtlRunnerFactory' in '{0}'.", assembly.FullName)); var etlRunnerFactory = Activator.CreateInstance(types.ElementAt(0)) as IEtlRunnerFactory; var etlRunner = etlRunnerFactory.Get(etl); return etlRunner; }
public EtlDtsWindowsRunner(IEtl etl) : base(etl) { }
public EtlDtsRunner(IEtl etl) : base(etl) { }
public EtlDtsSqlServerRunner(IEtl etl) : base(etl) { }
public EtlCatalogRunner(IEtl etl) : base(etl) { }
public EtlFileRunner(IEtl etl) : base(etl) { }
public IEtlRunner Get(IEtl etl) { var factory = new SsisEtlRunnerFactory(); var runner = factory.Get(etl); return runner; }
protected abstract Package Load(IEtl etl, Application app);
public EtlRunner(IEtl etl) { Etl = etl; }