Exemplo n.º 1
0
 public static void BatchDelete(string bucket, string[] keys)
 {
     RSClient client = new RSClient();
     List<EntryPath> EntryPaths = new List<EntryPath>();
     foreach (string key in keys)
     {
         Console.WriteLine("\n===> Stat {0}:{1}", bucket, key);
         EntryPaths.Add(new EntryPath(bucket, key));
     }
     client.BatchDelete(EntryPaths.ToArray());
 }
Exemplo n.º 2
0
        public void BatchDeleteTest()
        {
            List<string> tmps = RSHelper.RSPut(Bucket,2);

            RSClient target = new RSClient(); // TODO: 初始化为适当的值
            EntryPath[] keys = new EntryPath[2]; // TODO: 初始化为适当的值
            int i = 0;
            foreach (string k in tmps) {
                keys [i++] = new EntryPath (Bucket, k);
            }

            CallRet actual;
            actual = target.BatchDelete(keys);
            if (actual.OK) {
                foreach (string k in tmps) {
                    RSHelper.RSDel(Bucket,k);
                }
            }
            Assert.IsTrue(actual.OK, "BatchStatTest Failure"); ;
        }