예제 #1
0
        public static bool StartSync(string cinUserName, string cinAPiKey, string crmAPIKey, string crmAccountId, string crmUserName, DateTime?fromDate)
        {
            try
            {
                if (fromDate.HasValue)
                {
                    fromDate = fromDate.Value.ToUniversalTime();
                }
                var product  = new ProductsSync(cinUserName, cinAPiKey, crmAPIKey, crmAccountId, crmUserName, fromDate);
                var category = new CategoriesSync(cinUserName, cinAPiKey, crmAPIKey, crmAccountId, crmUserName, fromDate);
                var contact  = new ContactsSync(cinUserName, cinAPiKey, crmAPIKey, crmAccountId, crmUserName, fromDate);
                var order    = new OrderSync(cinUserName, cinAPiKey, crmAPIKey, crmAccountId, crmUserName, fromDate);
                var store    = new StoreSync(cinUserName, cinAPiKey, crmAPIKey, crmAccountId, crmUserName, fromDate);

                // store.Start();
                category.Start();
                product.Start();
                contact.Start();
                order.Start();
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
예제 #2
0
 public Engine(INetworkServer server,
               IPolicyServer policyServer,
               TServer thriftServer,
               DbLoader dbLoader,
               IPlayerSelectorFactory playerSelector,
               IPlayersRemoverFactory playersRemoverFactory,
               IStrongholdManager strongholdManager,
               IBarbarianTribeManager barbarianTribeManager,
               IWorld world,
               SystemVariablesUpdater systemVariablesUpdater,
               IScheduler scheduler,
               IDbManager dbManager,
               StrongholdActivationChecker strongholdActivationChecker,
               StrongholdChecker strongholdChecker,
               BarbarianTribeChecker barbarianTribeChecker,
               ICityChannel cityChannel,
               IStrongholdManagerLogger strongholdManagerLogger,
               StoreSync storeSync,
               IQueueListener queueListener,
               MapDataExport mapDataExport)
 {
     this.server                = server;
     this.policyServer          = policyServer;
     this.thriftServer          = thriftServer;
     this.dbLoader              = dbLoader;
     this.playerSelector        = playerSelector;
     this.playersRemoverFactory = playersRemoverFactory;
     this.strongholdManager     = strongholdManager;
     this.barbarianTribeManager = barbarianTribeManager;
     this.world = world;
     this.systemVariablesUpdater = systemVariablesUpdater;
     this.scheduler = scheduler;
     this.dbManager = dbManager;
     this.strongholdActivationChecker = strongholdActivationChecker;
     this.strongholdChecker           = strongholdChecker;
     this.barbarianTribeChecker       = barbarianTribeChecker;
     this.cityChannel             = cityChannel;
     this.strongholdManagerLogger = strongholdManagerLogger;
     this.storeSync     = storeSync;
     this.queueListener = queueListener;
     this.mapDataExport = mapDataExport;
 }