コード例 #1
0
        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;
        }
コード例 #2
0
 public RequestData LogRequest(RequestData requestData)
 {
     return ActivityDB.LogRequest(requestData);
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
     }
 }
コード例 #5
0
ファイル: ActivityTracking.cs プロジェクト: sponnusa/Master
 public RequestData LogRequest(RequestData requestData)
 {
     return(ActivityDB.LogRequest(requestData));
 }