コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: BikS2013/bUtility
        public void TestMethod1()
        {
            var t = new testClass
            {
                channel = "ch1",
                username = "******",
                password = "******",
                sessionId = Guid.NewGuid().ToString()
            };
            var fields = new string[] { "username", "password", "sessionId", "channel" };

            Dictionary<string, string> rqst = new Dictionary<string, string>();
            var sid = t.GetValue<string>("sessionId", null);
            fields.ToList().ForEach(f => rqst[f] = t.GetValue<string>(f, null));

        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: renick/bUtility
        public void TestMethod1()
        {
            var t = new testClass
            {
                channel   = "ch1",
                username  = "******",
                password  = "******",
                sessionId = Guid.NewGuid().ToString()
            };
            var fields = new string[] { "username", "password", "sessionId", "channel" };

            Dictionary <string, string> rqst = new Dictionary <string, string>();
            var sid = t.GetValue <string>("sessionId", null);

            fields.ToList().ForEach(f => rqst[f] = t.GetValue <string>(f, null));
        }