Skip to content

Commit 47ca94e

Browse files
committed
Fixed Container#133
1 parent facf548 commit 47ca94e

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

package.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>5.9.0</Version>
4+
<Version>5.9.1</Version>
55
<PackageReleaseNotes>This package is distributed as .NET Standard 1.3 and .NET 4.6</PackageReleaseNotes>
66
</PropertyGroup>
77

src/Log4NetExtension.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using log4net;
22
using System;
3-
using System.Runtime.CompilerServices;
43
using System.Security;
54
using Unity.Builder;
65
using Unity.Extension;
@@ -19,13 +18,7 @@ protected override void Initialize()
1918

2019
public ResolveDelegate<BuilderContext> GetResolver(ref BuilderContext context)
2120
{
22-
Type declaringType;
23-
24-
unsafe
25-
{
26-
var parenContext = Unsafe.AsRef<BuilderContext>(context.Parent.ToPointer());
27-
declaringType = parenContext.RegistrationType;
28-
}
21+
Type declaringType = context.DeclaringType;
2922

3023
return (ref BuilderContext c) => LogManager.GetLogger(declaringType);
3124
}

src/Unity.log4net.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<AssemblyOriginatorKeyFile>package.snk</AssemblyOriginatorKeyFile>
2121
<DelaySign>false</DelaySign>
2222
<RootNamespace>Unity.log4net</RootNamespace>
23-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2423
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
2524
</PropertyGroup>
2625

0 commit comments

Comments
 (0)