コード例 #1
0
        public static string TryGetTrimmedFile(this IStackTraceLine line, Regex regex, Func <string, string> additionalTransformOnSuccess)
        {
            var fileName = line?.File ?? _DefaultFileValue;
            var match    = regex.Match(fileName);

            return(match.Success
                ? additionalTransformOnSuccess(match.Value)
                : fileName);
        }
コード例 #2
0
 public static bool IsFromNamespaces(
     this IStackTraceLine line,
     params string[] prefixes) => prefixes.Any(str => (line?.Method?.StartsWith(str)).GetValueOrDefault());
コード例 #3
0
 public static string TryGetTrimmedFile(this IStackTraceLine line, Regex regex) => line.TryGetTrimmedFile(regex, str => str);
コード例 #4
0
 public static bool HasSuccessfullyParsedFile(this IStackTraceLine line) => !string.IsNullOrWhiteSpace(line?.File);