示例#1
0
        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
        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));
        }