Skip to content

Commit

Permalink
Merge pull request #30 from NeVeSpl/ParamsKeywordForArrays
Browse files Browse the repository at this point in the history
add params keyword to fluent api method parameter
  • Loading branch information
BenMorris authored Dec 14, 2019
2 parents f79ec79 + 5f47d9b commit d9fd70a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/NetArchTest.Rules/Conditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public ConditionList HaveDependencyOn(string dependency)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public ConditionList HaveDependencyOnAny(string[] dependencies)
public ConditionList HaveDependencyOnAny(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAny, dependencies, true);
return new ConditionList(_types, _should, _sequence);
Expand All @@ -485,7 +485,7 @@ public ConditionList HaveDependencyOnAny(string[] dependencies)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public ConditionList HaveDependencyOnAll(string[] dependencies)
public ConditionList HaveDependencyOnAll(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAll, dependencies, true);
return new ConditionList(_types, _should, _sequence);
Expand All @@ -506,7 +506,7 @@ public ConditionList NotHaveDependencyOn(string dependency)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public ConditionList NotHaveDependencyOnAny(string[] dependencies)
public ConditionList NotHaveDependencyOnAny(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAny, dependencies, false);
return new ConditionList(_types, _should, _sequence);
Expand All @@ -517,7 +517,7 @@ public ConditionList NotHaveDependencyOnAny(string[] dependencies)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public ConditionList NotHaveDependencyOnAll(string[] dependencies)
public ConditionList NotHaveDependencyOnAll(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAll, dependencies, false);
return new ConditionList(_types, _should, _sequence);
Expand Down
8 changes: 4 additions & 4 deletions src/NetArchTest.Rules/Predicates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public PredicateList HaveDependencyOn(string dependency)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public PredicateList HaveDependencyOnAny(string[] dependencies)
public PredicateList HaveDependencyOnAny(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAny, dependencies, true);
return new PredicateList(_types, _sequence);
Expand All @@ -489,7 +489,7 @@ public PredicateList HaveDependencyOnAny(string[] dependencies)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public PredicateList HaveDependencyOnAll(string[] dependencies)
public PredicateList HaveDependencyOnAll(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAll, dependencies, true);
return new PredicateList(_types, _sequence);
Expand All @@ -511,7 +511,7 @@ public PredicateList DoNotHaveDependencyOn(string dependency)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public PredicateList DoNotHaveDependencyOnAny(string[] dependencies)
public PredicateList DoNotHaveDependencyOnAny(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAny, dependencies, false);
return new PredicateList(_types, _sequence);
Expand All @@ -522,7 +522,7 @@ public PredicateList DoNotHaveDependencyOnAny(string[] dependencies)
/// </summary>
/// <param name="dependencies">The dependencies to match against. These can be namespaces or specific types.</param>
/// <returns>An updated set of conditions that can be applied to a list of types.</returns>
public PredicateList DoNotHaveDependencyOnAll(string[] dependencies)
public PredicateList DoNotHaveDependencyOnAll(params string[] dependencies)
{
_sequence.AddFunctionCall(FunctionDelegates.HaveDependencyOnAll, dependencies, false);
return new PredicateList(_types, _sequence);
Expand Down

0 comments on commit d9fd70a

Please sign in to comment.