public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext) { var serviceMethodLogService = _container.GetInstance <IServiceMethodLogService>(); int threadId; int logId; try { threadId = Thread.CurrentThread.ManagedThreadId; MessageDictionary.Add(threadId, request); var logEntry = new ServiceMethodLog { Service = request.Headers.To.LocalPath, Method = request.Headers.Action, RequestMessage = request.ToString() }; logId = serviceMethodLogService.AddLog(ref logEntry); } finally { _container.Release(serviceMethodLogService); } return(new MessageInspectorContext(threadId, logId, DateTime.Now)); }
public int AddLog(ref ServiceMethodLog logEntry) { var dalLogEntry = this._mapper.Map <DalServiceLog>(logEntry); this._serviceMethodLogRepository.Create(dalLogEntry); logEntry.Id = dalLogEntry.Id; return(logEntry.Id); }
public int AddLog(ref ServiceMethodLog logEntry) { return(0); }