示例#1
0
        public void LogReadByPage()
        {
            Mock<IRequestContext> rc = new Mock<IRequestContext>();
           LogSql log = new LogSql(rc.Object,"ShopContext");
            log.ReadRange(0, 10);

        }
示例#2
0
        public void TestLogSql()
        {
            HttpContext.Current = new HttpContext(new HttpRequest("", "http://test.org", ""),
                                                  new HttpResponse(new StringWriter()));

            LogSql log = new LogSql();

            log.LogWriteInfo("TestLogSql message");
            log.Dispose();
        }
示例#3
0
        public void TestLogExplicitDispose()
        {
            HttpContext.Current = new HttpContext(new HttpRequest("", "http://test.org", ""),
                                                  new HttpResponse(new StringWriter()));

            LogSql log = new LogSql();

            log.LogWriteInfo("TestLogSql message");
            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
示例#4
0
 private void Execute()
 {
     for (int i = 0; i < 100; i++)
     {
         Task.Factory.StartNew(() =>
         {
             LogSql log = new LogSql();
             log.LogWriteInfo("test message");
             log.Dispose();
         }, TaskCreationOptions.AttachedToParent);
     }
 }
示例#5
0
 public void addLogList(LogSql ologSql)
 {
     ActiveLog oActiveLog = (ActiveLog)this.getCache();
     oActiveLog.addLogList(ologSql);
 }
示例#6
0
 public void addLogList(LogSql oLogSql)
 {
     this._listSql.Add(oLogSql);
 }
示例#7
0
 public void addLogList(LogSql oLogSql)
 {
     this._listSql.Add(oLogSql);
 }
示例#8
0
    public void addLogList(LogSql ologSql)
    {
        ActiveLog oActiveLog = (ActiveLog)this.getCache();

        oActiveLog.addLogList(ologSql);
    }