示例#1
0
文件: Session.cs 项目: juhan/NModel
        /// <summary>
        /// Just a scenario to test whether the adapter actually does something useful.
        /// This is helpful to try out the adapter without calling ct.exe, the conformance
        /// tester of NModel.
        /// </summary>
        /// <param name="args"></param>
        public static void Main(String[] args)
        {
            Session session = new Session();

            string currentURL = "http://192.168.32.128/doStuff.php";
            string currentUser = "******";
            string currentPassword = "******";

            string page = "";
            page = session.getQuery(currentURL, "");

            string queryString = "username="******"&" +
                     "password=" + currentPassword;

            page = session.postQuery(currentURL, currentURL, queryString);

            Console.WriteLine(page);
        }
示例#2
0
文件: Stepper.cs 项目: juhan/NModel
 private Session getUserSession(string userName)
 {
     Session session=null;
     sessionDictionary.TryGetValue(userName, out session);
     if (session == null)
     {
         session = new Session();
         sessionDictionary.Add(userName, session);
     }
     return session;
 }