Skip to content

Commit

Permalink
Fixed Container#133
Browse files Browse the repository at this point in the history
  • Loading branch information
ENikS committed Jan 24, 2019
1 parent facf548 commit 47ca94e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>5.9.0</Version>
<Version>5.9.1</Version>
<PackageReleaseNotes>This package is distributed as .NET Standard 1.3 and .NET 4.6</PackageReleaseNotes>
</PropertyGroup>

Expand Down
9 changes: 1 addition & 8 deletions src/Log4NetExtension.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using log4net;
using System;
using System.Runtime.CompilerServices;
using System.Security;
using Unity.Builder;
using Unity.Extension;
Expand All @@ -19,13 +18,7 @@ protected override void Initialize()

public ResolveDelegate<BuilderContext> GetResolver(ref BuilderContext context)
{
Type declaringType;

unsafe
{
var parenContext = Unsafe.AsRef<BuilderContext>(context.Parent.ToPointer());
declaringType = parenContext.RegistrationType;
}
Type declaringType = context.DeclaringType;

return (ref BuilderContext c) => LogManager.GetLogger(declaringType);
}
Expand Down
1 change: 0 additions & 1 deletion src/Unity.log4net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<AssemblyOriginatorKeyFile>package.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<RootNamespace>Unity.log4net</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
</PropertyGroup>

Expand Down

0 comments on commit 47ca94e

Please sign in to comment.