/// <summary>Create a filter with two filters, one of which must match.</summary> /// <remarks>Create a filter with two filters, one of which must match.</remarks> /// <param name="a">first filter to test.</param> /// <param name="b">second filter to test.</param> /// <returns>a filter that must match at least one input filter.</returns> public static RevFilter Create(RevFilter a, RevFilter b) { if (a == ALL || b == ALL) { return(ALL); } return(new OrRevFilter.Binary(a, b)); }
/// <summary>Create a filter with two filters, one of which must match.</summary> /// <remarks>Create a filter with two filters, one of which must match.</remarks> /// <param name="a">first filter to test.</param> /// <param name="b">second filter to test.</param> /// <returns>a filter that must match at least one input filter.</returns> public static RevFilter Create(RevFilter a, RevFilter b) { if (a == ALL || b == ALL) { return ALL; } return new OrRevFilter.Binary(a, b); }
public override RevFilter Clone() { RevFilter[] s = new RevFilter[subfilters.Length]; for (int i = 0; i < s.Length; i++) { s[i] = subfilters[i].Clone(); } return(new AndRevFilter.List(s)); }
/// <summary>Create a filter with two filters, both of which must match.</summary> /// <remarks>Create a filter with two filters, both of which must match.</remarks> /// <param name="a">first filter to test.</param> /// <param name="b">second filter to test.</param> /// <returns>a filter that must match both input filters.</returns> public static RevFilter Create(RevFilter a, RevFilter b) { if (a == ALL) { return(b); } if (b == ALL) { return(a); } return(new AndRevFilter.Binary(a, b)); }
/// <summary>Create a filter with two filters, both of which must match.</summary> /// <remarks>Create a filter with two filters, both of which must match.</remarks> /// <param name="a">first filter to test.</param> /// <param name="b">second filter to test.</param> /// <returns>a filter that must match both input filters.</returns> public static RevFilter Create(RevFilter a, RevFilter b) { if (a == ALL) { return b; } if (b == ALL) { return a; } return new AndRevFilter.Binary(a, b); }
/// <summary>Create a filter around many filters, all of which must match.</summary> /// <remarks>Create a filter around many filters, all of which must match.</remarks> /// <param name="list"> /// list of filters to match against. Must contain at least 2 /// filters. /// </param> /// <returns>a filter that must match all input filters.</returns> public static RevFilter Create(RevFilter[] list) { if (list.Length == 2) { return(Create(list[0], list[1])); } if (list.Length < 2) { throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded); } RevFilter[] subfilters = new RevFilter[list.Length]; System.Array.Copy(list, 0, subfilters, 0, list.Length); return(new AndRevFilter.List(subfilters)); }
/// <summary>Create a filter around many filters, all of which must match.</summary> /// <remarks>Create a filter around many filters, all of which must match.</remarks> /// <param name="list"> /// list of filters to match against. Must contain at least 2 /// filters. /// </param> /// <returns>a filter that must match all input filters.</returns> public static RevFilter Create(ICollection <RevFilter> list) { if (list.Count < 2) { throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded); } RevFilter[] subfilters = new RevFilter[list.Count]; Sharpen.Collections.ToArray(list, subfilters); if (subfilters.Length == 2) { return(Create(subfilters[0], subfilters[1])); } return(new AndRevFilter.List(subfilters)); }
/// <summary>Create a filter around many filters, all of which must match.</summary> /// <remarks>Create a filter around many filters, all of which must match.</remarks> /// <param name="list"> /// list of filters to match against. Must contain at least 2 /// filters. /// </param> /// <returns>a filter that must match all input filters.</returns> public static RevFilter Create(RevFilter[] list) { if (list.Length == 2) { return Create(list[0], list[1]); } if (list.Length < 2) { throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded); } RevFilter[] subfilters = new RevFilter[list.Length]; System.Array.Copy(list, 0, subfilters, 0, list.Length); return new AndRevFilter.List(subfilters); }
internal Binary(RevFilter one, RevFilter two) { a = one; b = two; requiresCommitBody = a.RequiresCommitBody() || b.RequiresCommitBody(); }
private static RevFilter ApplyNoMergesFilter(RevFilter filter) { return AndRevFilter.Create(new[] {RevFilter.NO_MERGES, filter}); }
private NotRevFilter(RevFilter one) { a = one; }
internal PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int @out) { walker = w; pending = p; filter = f; output = @out; canDispose = true; }
/// <summary>Create a filter that negates the result of another filter.</summary> /// <remarks>Create a filter that negates the result of another filter.</remarks> /// <param name="a">filter to negate.</param> /// <returns>a filter that does the reverse of <code>a</code>.</returns> public static RevFilter Create(RevFilter a) { return(new NGit.Revwalk.Filter.NotRevFilter(a)); }
internal List(RevFilter[] list) { subfilters = list; }
/// <summary>Create a filter around many filters, all of which must match.</summary> /// <remarks>Create a filter around many filters, all of which must match.</remarks> /// <param name="list"> /// list of filters to match against. Must contain at least 2 /// filters. /// </param> /// <returns>a filter that must match all input filters.</returns> public static RevFilter Create(ICollection<RevFilter> list) { if (list.Count < 2) { throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded); } RevFilter[] subfilters = new RevFilter[list.Count]; Sharpen.Collections.ToArray(list, subfilters); if (subfilters.Length == 2) { return Create(subfilters[0], subfilters[1]); } return new AndRevFilter.List(subfilters); }
public override RevFilter Clone() { RevFilter[] s = new RevFilter[subfilters.Length]; for (int i = 0; i < s.Length; i++) { s[i] = subfilters[i].Clone(); } return new AndRevFilter.List(s); }
internal List(RevFilter[] list) { subfilters = list; bool rcb = false; foreach (RevFilter filter in subfilters) { rcb |= filter.RequiresCommitBody(); } requiresCommitBody = rcb; }
/// <summary>Create a filter that negates the result of another filter.</summary> /// <remarks>Create a filter that negates the result of another filter.</remarks> /// <param name="a">filter to negate.</param> /// <returns>a filter that does the reverse of <code>a</code>.</returns> public static RevFilter Create(RevFilter a) { return new NGit.Revwalk.Filter.NotRevFilter(a); }
internal Binary(RevFilter one, RevFilter two) { a = one; b = two; }