Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khellang committed Aug 29, 2018
1 parent 40a74e4 commit c04facd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/Scrutor/IImplementationTypeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,16 @@ public interface IImplementationTypeFilter : IFluentInterface
/// <summary>
/// Will match all types in the exact same namespace as the type <paramref name="types"/>
/// </summary>
/// <param name="types">The type in the namespace to include</param>
/// <param name="types">The types in the namespaces to include.</param>
/// <exception cref="ArgumentNullException">If the <paramref name="types"/> argument is <c>null</c>.</exception>
IImplementationTypeFilter InExactNamespaceOf(params Type[] types);


/// <summary>
/// Will match all types in the exact same namespace as the type <paramref name="namespaces"/>
/// </summary>
/// <param name="namespaces">The namespace to include</param>
/// <param name="namespaces">The namespace to include.</param>
/// <exception cref="ArgumentNullException">If the <paramref name="namespaces"/> argument is <c>null</c>.</exception>
IImplementationTypeFilter InExactNamespacesOf(params string[] namespaces);
IImplementationTypeFilter InExactNamespaces(params string[] namespaces);

/// <summary>
/// Will match all types in any of the <paramref name="namespaces"/> specified.
Expand Down
2 changes: 1 addition & 1 deletion src/Scrutor/ImplementationTypeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public IImplementationTypeFilter InExactNamespaceOf(params Type[] types)
return Where(t => types.Any(x => t.IsInExactNamespace(x.Namespace)));
}

public IImplementationTypeFilter InExactNamespacesOf(params string[] namespaces)
public IImplementationTypeFilter InExactNamespaces(params string[] namespaces)
{
Preconditions.NotNull(namespaces, nameof(namespaces));

Expand Down
2 changes: 1 addition & 1 deletion src/Scrutor/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static bool IsInNamespace(this Type type, string @namespace)

public static bool IsInExactNamespace(this Type type, string @namespace)
{
return type.Namespace == @namespace;
return string.Equals(type.Namespace, @namespace, StringComparison.Ordinal);
}

public static bool HasAttribute(this Type type, Type attributeType)
Expand Down
4 changes: 0 additions & 4 deletions test/Scrutor.Tests/Scrutor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="xunit" Version="2.4.0" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>

0 comments on commit c04facd

Please sign in to comment.