Fixed Container#133
This commit is contained in:
Родитель
240373246f
Коммит
a72658bf50
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>5.9.0</Version>
|
||||
<Version>5.9.1</Version>
|
||||
<PackageReleaseNotes>This package is an Unity adapter to Microsoft.Extensions.Logging.2+</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security;
|
||||
using Unity.Builder;
|
||||
using Unity.Extension;
|
||||
using Unity.Policy;
|
||||
using System.Security;
|
||||
using Unity.Resolution;
|
||||
|
||||
namespace Unity.Microsoft.Logging
|
||||
|
@ -64,16 +63,7 @@ namespace Unity.Microsoft.Logging
|
|||
{
|
||||
return ((ref BuilderContext c) =>
|
||||
{
|
||||
Type declaringType = null;
|
||||
|
||||
if (IntPtr.Zero != c.Parent)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
var parenContext = Unsafe.AsRef<BuilderContext>(c.Parent.ToPointer());
|
||||
declaringType = parenContext.RegistrationType;
|
||||
}
|
||||
}
|
||||
Type declaringType = c.DeclaringType;
|
||||
|
||||
return null == declaringType
|
||||
? LoggerFactory.CreateLogger(c.Name ?? UnityContainer.All)
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<DelaySign>false</DelaySign>
|
||||
<RootNamespace>Unity.Microsoft.Logging</RootNamespace>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
|
|
Загрузка…
Ссылка в новой задаче