public override void OnEntry(MethodExecutionArgs args) { IPassport thisPassport = null; if (_passportParameterIndex >= 0) { thisPassport = (IPassport)args.Arguments[_passportParameterIndex]; } if (thisPassport == null) { return; } var scopeName = args.ScopeName(); thisPassport.PushScope(scopeName); IDictionary <string, object> parameters = new Dictionary <string, object>(); for (var i = 0; i < args.Arguments.Count; i++) { if (!_passportParameters.Contains(_parameterNames[i])) { parameters[_parameterNames[i]] = args.Arguments[i] ?? "null"; } } thisPassport.Scope.RecordParameters(() => parameters, Constants.PassportScope.Enter); thisPassport.Debug("Has been entered", includeContext: true, includeScopes: true, scopeDepth: 0); }
public override void OnEntry(MethodExecutionArgs args) { var instance = args.Instance as IHasPassport; if (instance == null) return; var thisPassport = instance.Passport; if (thisPassport == null) return; var scopeName = args.ScopeName(); thisPassport.PushScope(scopeName); IDictionary<string, object> parameters = new Dictionary<string, object>(); for (var i = 0; i < args.Arguments.Count; i++) { if (_sessionParameterIndex == i) { thisPassport.SessionId = args.Arguments[i]; } else { parameters[_parameterNames[i]] = args.Arguments[i] ?? "null"; } } thisPassport.PassportId = Guid.NewGuid(); thisPassport.Scope.RecordParameters(() => parameters, Constants.PassportScope.Enter); thisPassport.Debug("Has been entered", includeContext: true, includeScopes: true, scopeDepth: 0); }
public override void OnEntry(MethodExecutionArgs args) { IPassport thisPassport = null; if (_passportParameterIndex >= 0) { thisPassport = (IPassport)args.Arguments[_passportParameterIndex]; } if (thisPassport== null) return; var scopeName = args.ScopeName(); thisPassport.PushScope(scopeName); IDictionary<string, object> parameters = new Dictionary<string, object>(); for (var i = 0; i < args.Arguments.Count; i++) { if (!_passportParameters.Contains(_parameterNames[i])) { parameters[_parameterNames[i]] = args.Arguments[i] ?? "null"; } } thisPassport.Scope.RecordParameters(() => parameters, Constants.PassportScope.Enter); thisPassport.Debug("Has been entered", includeContext: true, includeScopes: true, scopeDepth: 0); }
public override void OnEntry(MethodExecutionArgs args) { var instance = args.Instance as IHasPassport; if (instance == null) { return; } var thisPassport = instance.Passport; if (thisPassport == null) { return; } var scopeName = args.ScopeName(); thisPassport.PushScope(scopeName); IDictionary <string, object> parameters = new Dictionary <string, object>(); for (var i = 0; i < args.Arguments.Count; i++) { if (_sessionParameterIndex == i) { thisPassport.SessionId = args.Arguments[i]; } else { parameters[_parameterNames[i]] = args.Arguments[i] ?? "null"; } } thisPassport.PassportId = Guid.NewGuid(); thisPassport.Scope.RecordParameters(() => parameters, Constants.PassportScope.Enter); thisPassport.Debug("Has been entered", includeContext: true, includeScopes: true, scopeDepth: 0); }