/// <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); }
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; }