コード例 #1
0
        public void GetDataTest()
        {
            ThreadStaticStore target = new ThreadStaticStore();

            string key = "object";
            object expected = "11";
            target.SetData(key, expected);
            object actual;
            actual = target.GetData(key);
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void SetDataTest()
        {
            ThreadStaticStore target = new ThreadStaticStore();
            string key = "object";
            object data = 1;
            target.SetData(key, data);

            Assert.AreEqual(data, target.GetData(key));
            target.SetData(key, "2");
            Assert.AreEqual("2", target.GetData(key));
        }
コード例 #3
0
 public void ThreadStaticStoreConstructorTest()
 {
     ThreadStaticStore target = new ThreadStaticStore();
 }
コード例 #4
0
ファイル: SharePool.cs プロジェクト: luqizheng/Qi4Net
 private ThreadStatcBuilder()
 {
     Store = new ThreadStaticStore();
 }