static void Main(string[] args) { Drawing(); if (args.Length == 0) return; ProjectConfig config = GetConfig(args); if (config == null) return; try { IGeneralFactory factory = CreateGeneral(config); if (config.Mode == GeneralInfo.Db) factory.DbFirst(config); else factory.CodeFirst(config); } catch (Exception ex) { Console.WriteLine("{0}\n{1}", ex.Message, ex.StackTrace); } Console.WriteLine("success."); }
public EffectsManager(IEffectsMgrClient effectsClient) { _effectsClient = effectsClient; _generalFactory = References.GeneralFactory; _gameMgr = References.GameManager; _myPoolMgr = References.MyPoolManager; Subscribe(); }
public GenerateDocumentService(IGeneralFactory generalFactory, IGeneralRepository generalRepository, IAccountRepository accountRepository, ISessionStateService session) { this.generalFactory = generalFactory; this.generalRepository = generalRepository; this.accountRepository = accountRepository; this.session = session; }
public GeneralService(IGeneralFactory generalFactory, IDigitalFileServices digitalFileServices, IDigitalFileRepository digitalFileRepository, IGeneralRepository generalRepository, IAccountRepository accountRepository, ISessionStateService session) { this.generalFactory = generalFactory; this.generalRepository = generalRepository; this.accountRepository = accountRepository; this.digitalFileServices = digitalFileServices; this.digitalFileRepository = digitalFileRepository; this.session = session; }
static IGeneralFactory CreateGeneral(ProjectConfig config) { var fileName = "MyStaging." + config.Provider + ".dll"; var dir = System.IO.Directory.GetCurrentDirectory(); var providerFile = System.IO.Directory.GetFiles(dir, fileName, SearchOption.AllDirectories).FirstOrDefault(); if (string.IsNullOrEmpty(providerFile)) throw new FileNotFoundException(fileName); IGeneralFactory factory = null; var types = Assembly.LoadFrom(providerFile).GetTypes(); foreach (var t in types) { if (t.GetInterface(typeof(IGeneralFactory).Name) != null) { factory = (IGeneralFactory)Activator.CreateInstance(t); break; } } return factory; }
public LookupServices(ILookupRepository lookupRepository, IGeneralFactory generalFactory) { this.generalFactory = generalFactory; this.lookupRepository = lookupRepository; }
public GeneralService(ILookUpRepository lookUpRepository, IGeneralFactory generalFactory) { this.lookUpRepository = lookUpRepository; this.generalFactory = generalFactory; }