Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Moq/Interception/CastleProxyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Text;
#endif

using Castle.Core.Logging;
using Castle.DynamicProxy;

using Moq.Internals;
Expand All @@ -34,6 +35,8 @@
{
this.generationOptions = new ProxyGenerationOptions { Hook = new IncludeObjectMethodsHook(), BaseTypeForInterfaceProxy = typeof(InterfaceProxy) };
this.generator = new ProxyGenerator();
(this.generator.Logger as TraceLogger)?.Level = LoggerLevel.Warn;

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

Check failure on line 38 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Feature 'null conditional assignment' is not available in C# 10.0. Please use language version 14.0 or greater.

this.classGenerators = new ConcurrentDictionary<string, ProxyGenerator>();
}

Expand Down Expand Up @@ -81,7 +84,7 @@

public override bool IsMethodVisible(MethodInfo method, out string messageIfNotVisible)
{
return ProxyUtil.IsAccessible(method, out messageIfNotVisible);

Check warning on line 87 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Possible null reference assignment.
}

public override bool IsTypeVisible(Type type)
Expand Down Expand Up @@ -152,7 +155,7 @@
#endif

this.underlying.Proceed();
return this.underlying.ReturnValue;

Check warning on line 158 in src/Moq/Interception/CastleProxyFactory.cs

View workflow job for this annotation

GitHub Actions / build-windows-latest

Possible null reference return.
}

public void DetachFromUnderlying()
Expand Down
Loading