Skip to content

Commit

Permalink
Remove unnecessary accessibility modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 3, 2023
1 parent 291b68a commit 9bb30db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2,300 deletions.
2 changes: 1 addition & 1 deletion src/Moq/Moq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NuGetizer" Version="1.0.5" />
<PackageReference Include="TypeNameFormatter.Sources" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="TypeNameFormatter.Sources" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0' ">
Expand Down
9 changes: 3 additions & 6 deletions src/Moq/Obsolete/MockFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,9 @@ public Mock<T> Create<T>(params object[] args)
{
// "fix" compiler picking this overload instead of
// the one receiving the mock behavior.
if (args != null && args.Length > 0 && args[0] is MockBehavior)
{
return CreateMock<T>((MockBehavior)args[0], args.Skip(1).ToArray());
}

return CreateMock<T>(defaultBehavior, args);
return args != null && args.Length > 0 && args[0] is MockBehavior behavior
? CreateMock<T>(behavior, args.Skip(1).ToArray())
: CreateMock<T>(defaultBehavior, args);
}

/// <summary>
Expand Down
Loading

0 comments on commit 9bb30db

Please sign in to comment.