public ActionResult LogTest()
        {
            Task task = new Task(() => {
                WkrLoggerService.LoggerService service = new WkrLoggerService.LoggerService();
                //new WkrLoggerService.DebugLogger() { LogDate=DateTime.Now.Date, LogTime= DateTime.Now, Message="Debug", Remark="Remark" }
                var log = new ErrorLogger() { InnerException = "InnerException", LogDate = DateTime.Now.Date, LogTime = DateTime.Now };
                service.ErrorMessage(log);
            });

            task.Start();

            return Content("SUCCESS");
        }
示例#2
0
 public void ErrorMessage(ErrorLogger log) {
     this.Invoke("ErrorMessage", new object[] {
                 log});
 }
示例#3
0
 /// <remarks/>
 public void ErrorMessageAsync(ErrorLogger log) {
     this.ErrorMessageAsync(log, null);
 }
示例#4
0
 /// <remarks/>
 public void ErrorMessageAsync(ErrorLogger log, object userState) {
     if ((this.ErrorMessageOperationCompleted == null)) {
         this.ErrorMessageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnErrorMessageOperationCompleted);
     }
     this.InvokeAsync("ErrorMessage", new object[] {
                 log}, this.ErrorMessageOperationCompleted, userState);
 }