Skip to content

Commit ad1c813

Browse files
committed
Remove unnecessary accessibility modifiers
1 parent faeab7e commit ad1c813

3 files changed

Lines changed: 9 additions & 2300 deletions

File tree

src/Moq/Moq.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>
4343
<PackageReference Include="NuGetizer" Version="1.0.5" />
44-
<PackageReference Include="TypeNameFormatter.Sources" Version="1.0.0" PrivateAssets="All" />
44+
<PackageReference Include="TypeNameFormatter.Sources" Version="1.1.1" PrivateAssets="All" />
4545
</ItemGroup>
4646

4747
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0' ">

src/Moq/Obsolete/MockFactory.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,9 @@ public Mock<T> Create<T>(params object[] args)
248248
{
249249
// "fix" compiler picking this overload instead of
250250
// the one receiving the mock behavior.
251-
if (args != null && args.Length > 0 && args[0] is MockBehavior)
252-
{
253-
return CreateMock<T>((MockBehavior)args[0], args.Skip(1).ToArray());
254-
}
255-
256-
return CreateMock<T>(defaultBehavior, args);
251+
return args != null && args.Length > 0 && args[0] is MockBehavior behavior
252+
? CreateMock<T>(behavior, args.Skip(1).ToArray())
253+
: CreateMock<T>(defaultBehavior, args);
257254
}
258255

259256
/// <summary>

0 commit comments

Comments
 (0)