Пример #1
0
        private bool IgnoreMethod(IMethodInvocation input)
        {
            var  c = new MethodNameConverter(input);
            bool ignoredByMethodIdentifier = _options.IgnoredMethods.Any(m => m.Type.FullName == c.SourceContext && m.MethodName == c.EventId);

            return(ignoredByMethodIdentifier || input.MethodBase.CustomAttributes.ContainsIgnoreAttribute());
        }
Пример #2
0
        private StringBuilder AddMethod()
        {
            var sb = new StringBuilder("Method {EventId}");
            var c  = new MethodNameConverter(_input);

            _propertyValues.Add(c.EventId);
            Logger = Logger.ForContext("SourceContext", c.SourceContext);
            sb.Append(IsFailedResult ? " failed" : " returned");
            return(sb);
        }