public static RequestData randomRequestData(this ActivityTracking activityTracking, bool createLargeRequest) { var requestData = new RequestData() { Url = "/{0}.asmx/{1}".format(10.randomLetters(),10.randomLetters()) , Date = DateTime.Now, SessionID = Guid.NewGuid(), UserName = 10.randomLetters(), PostData = (createLargeRequest) ? "{{ {0} : '{1}' + '{2}' }}".format(50.randomLetters(), 500.randomLetters(), 5000.randomLetters()) : "{{ {0} : '{1}' }}".format(5.randomLetters(), 30.randomLetters()) }; return requestData; }
public RequestData LogRequest(RequestData requestData) { return ActivityDB.LogRequest(requestData); }
public static RequestData LogRequest(RequestData requestData) { if (requestData.notNull()) { waitForSave.WaitOne(); PastRequests.Add(requestData); waitForSave.Release(); SaveToDisk(); } else "in logRequest, requestData was null".error(); return requestData; }
public RequestData GetRequestData(Guid sessionID, string userName) { try { var httpContext = HttpContextFactory.Current; var postData = httpContext.GetPostDataAsString(); var url = httpContext.Request.Url; var requestData = new RequestData() { Url = url.notNull() ? url.str() : "", Date = DateTime.Now, UserName = userName, SessionID = sessionID, PostData = postData }; return requestData; } catch(Exception ex) { ex.log(); return null; } }
public RequestData LogRequest(RequestData requestData) { return(ActivityDB.LogRequest(requestData)); }