| | |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.LogHelper; |
| | | |
| | | namespace WIDESEA_Core.AOP |
| | | { |
| | | /// <summary> |
| | | /// 鎷︽埅鍣˙logLogAOP 缁ф壙IInterceptor鎺ュ彛 |
| | | /// 鎷︽埅鍣↙ogAOP 缁ф壙IInterceptor鎺ュ彛 |
| | | /// </summary> |
| | | public class LogAOP : IInterceptor |
| | | { |
| | |
| | | try |
| | | { |
| | | MiniProfiler.Current.Step($"鎵ц{invocation.InvocationTarget}.{invocation.Method.Name}()鏂规硶 -> "); |
| | | |
| | | //MethodParamsValidateAttribute? paramsValidateAttribute = invocation.Method.GetCustomAttribute<MethodParamsValidateAttribute>(); |
| | | //if (paramsValidateAttribute != null) |
| | | //{ |
| | | // foreach (var item in invocation.Arguments) |
| | | // { |
| | | |
| | | // } |
| | | //} |
| | | //鍦ㄨ鎷︽埅鐨勬柟娉曟墽琛屽畬姣曞悗 缁х画鎵ц褰撳墠鏂规硶锛屾敞鎰忔槸琚嫤鎴殑鏄紓姝ョ殑 |
| | | invocation.Proceed(); |
| | | |
| | | // 寮傛鑾峰彇寮傚父锛屽厛鎵ц |
| | | if (IsAsyncMethod(invocation.Method)) |
| | | { |