Beispiel #1
0
        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.");
        }
Beispiel #2
0
 public EffectsManager(IEffectsMgrClient effectsClient) {
     _effectsClient = effectsClient;
     _generalFactory = References.GeneralFactory;
     _gameMgr = References.GameManager;
     _myPoolMgr = References.MyPoolManager;
     Subscribe();
 }
Beispiel #3
0
 public GenerateDocumentService(IGeneralFactory generalFactory, IGeneralRepository generalRepository, IAccountRepository accountRepository, ISessionStateService session)
 {
     this.generalFactory    = generalFactory;
     this.generalRepository = generalRepository;
     this.accountRepository = accountRepository;
     this.session           = session;
 }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        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;
 }
Beispiel #7
0
 public GeneralService(ILookUpRepository lookUpRepository, IGeneralFactory generalFactory)
 {
     this.lookUpRepository = lookUpRepository;
     this.generalFactory   = generalFactory;
 }