/// <summary> /// Excludes the <paramref name="methodName"/> from checks for <see cref="ArgumentNullException"/>. /// </summary> /// <param name="fixture">The fixture.</param> /// <param name="methodName">The method name.</param> /// <param name="typeFullName">The <see cref="Type.FullName"/> of the <see cref="Type"/>.</param> /// <returns>The <paramref name="fixture"/>.</returns> /// <exception cref="ArgumentNullException">The <paramref name="fixture"/> or <paramref name="methodName"/> /// parameters are <see langword="null"/>.</exception> public static IArgumentNullExceptionFixture ExcludeMethod( this IArgumentNullExceptionFixture fixture, string methodName, string typeFullName = null) { if (fixture == null) { throw new ArgumentNullException(nameof(fixture)); } if (string.IsNullOrWhiteSpace(methodName)) { throw new ArgumentNullException(nameof(methodName)); } IRegexFilter regexFilter = fixture.GetRegexFilter(); regexFilter.ExcludeMethod(methodName, typeFullName); return(fixture); }
/// <summary> /// Excludes the <paramref name="methodName"/> from checks for <see cref="ArgumentNullException"/>. /// </summary> /// <param name="filter">The <see cref="Regex"/> filter.</param> /// <param name="methodName">The method name.</param> /// <param name="type">The type.</param> /// <returns>The <paramref name="filter"/>.</returns> /// <exception cref="ArgumentNullException">The <paramref name="filter"/> or <paramref name="methodName"/> /// parameters are <see langword="null"/>.</exception> public static IRegexFilter ExcludeMethod(this IRegexFilter filter, string methodName, Type type) { return(filter.ExcludeMethod(methodName, type != null ? type.FullName : null)); }