コード例 #1
0
 public StoreProcessor(int index)
 {
     this.index = index;
     logger = new ElibLogging("trace");
     _service = GetService();
     this.DateTime = DateTime.Now;
     Items = new List<CurrencyInfo>();
     MAX_LENGTH = Math.Max(CurrencyStoreSection.Instance.Task.PoolSize, 10);
     storaged = CurrencyStoreSection.Instance.Task.Storage.Enable;
 }
コード例 #2
0
 public StoreProcessor(int index)
 {
     this.index    = index;
     logger        = new ElibLogging("trace");
     _service      = GetService();
     this.DateTime = DateTime.Now;
     Items         = new List <CurrencyInfo>();
     MAX_LENGTH    = Math.Max(CurrencyStoreSection.Instance.Task.PoolSize, 10);
     storaged      = CurrencyStoreSection.Instance.Task.Storage.Enable;
 }
コード例 #3
0
ファイル: RemoteAgent.cs プロジェクト: kainhong/CurrencyStore
 public RemoteAgent()
 {
     var storaged = CurrencyStoreSection.Instance.Task.Storage.Enable;
     if (!storaged)
         service = new EmptyStorage();
     var type = CurrencyStoreSection.Instance.Task.Storage.Type;
     if (type == "file")
         service = new FileStorage();
     else if (type == "empty")
         service = new EmptyStorage();
     else
         service = ServiceFactory.GetService<ICurrencyService>();
 }
コード例 #4
0
        public RemoteAgent()
        {
            var storaged = CurrencyStoreSection.Instance.Task.Storage.Enable;

            if (!storaged)
            {
                service = new EmptyStorage();
            }
            var type = CurrencyStoreSection.Instance.Task.Storage.Type;

            if (type == "file")
            {
                service = new FileStorage();
            }
            else if (type == "empty")
            {
                service = new EmptyStorage();
            }
            else
            {
                service = ServiceFactory.GetService <ICurrencyService>();
            }
        }