Exemplo n.º 1
0
        // 1. I need to have all shards that are configured for this app
        // 2. I need to know how to decode the uuid and understand a shard id out of it
        // 3. I need to know a shard resolution strategy
        /// <summary>
        ///
        /// </summary>
        /// <param name="appName"></param>
        public AppContext(string appName)
        {
            _app = new App();
            _app.ApplicationName = appName;
            var dataReader = new DataFactory().GetdataReader(FetchMode.Sql);
            var shards = dataReader.GetAllShardByAppname(_app.ApplicationName);

            _app.Shards = shards;
        }
Exemplo n.º 2
0
 public void GetAllShardByAppname()
 {
     IDataReader dataReader = new DataFactory().GetdataReader(FetchMode.Sql);
     List<Shard> shardList = dataReader.GetAllShardByAppname("CxC");
     Assert.IsTrue(shardList.Count > 0);
 }