public object BeforeCall(string operationName, object[] inputs) { if (ServiceType == null) { return(null); } MethodInfo mi = ServiceType.GetMethod(operationName); if (mi == null) { return(null); } if (!LogArguments) { inputs = null; } SetLoggingContext(inputs, mi); if (LogBeforeCall) { LoggingArgument arg = CreateArgumentForInvokeLog(mi, inputs); LoggingStrategy.Log(arg); } return(null); }
public void AfterCall(string operationName, object[] outputs, object returnValue, object correlationState) { LoggingContext.ClearCurrentContextDetails(); if (!Log) { return; } if (!LogAfterCall) { return; } if (ServiceType == null) { return; } if (!LogArguments) { outputs = null; } if (!LogReturnVal) { returnValue = typeof(void); } MethodInfo mi = ServiceType.GetMethod(operationName); if (mi == null) { return; } LoggingArgument arg = CreateArgumentForResultLog(mi, outputs, returnValue); LoggingStrategy.Log(arg); }