Target .NET Core 2.0 and .NET Framework 4.6.1

This commit is contained in:
Nate McMaster 2017-06-08 12:30:54 -07:00
Родитель e4e3f22b09
Коммит 9fe85788e0
6 изменённых файлов: 13 добавлений и 16 удалений

Просмотреть файл

@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework' AND '$(OutputType)'=='library'">
<PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" />
<PackageReference Include="NETStandard.Library" Version="$(NETStandardImplicitPackageVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,9 +1,9 @@
<Project>
<PropertyGroup>
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
<CoreFxVersion>4.3.0</CoreFxVersion>
<CoreFxVersion>4.4.0-*</CoreFxVersion>
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
<NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion>
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion>
<TestSdkVersion>15.3.0-*</TestSdkVersion>
<XunitVersion>2.3.0-beta2-*</XunitVersion>

Просмотреть файл

@ -10,7 +10,7 @@ namespace System.Diagnostics
public static IDisposable SubscribeWithAdapter(this DiagnosticListener diagnostic, object target)
{
var adapter = new DiagnosticSourceAdapter(target);
return diagnostic.Subscribe(adapter, adapter.IsEnabled);
return diagnostic.Subscribe(adapter, (Predicate<string>)adapter.IsEnabled);
}
public static IDisposable SubscribeWithAdapter(
@ -19,7 +19,7 @@ namespace System.Diagnostics
Func<string, bool> isEnabled)
{
var adapter = new DiagnosticSourceAdapter(target, isEnabled);
return diagnostic.Subscribe(adapter, adapter.IsEnabled);
return diagnostic.Subscribe(adapter, (Predicate<string>)adapter.IsEnabled);
}
public static IDisposable SubscribeWithAdapter(
@ -28,7 +28,7 @@ namespace System.Diagnostics
Func<string, object, object, bool> isEnabled)
{
var adapter = new DiagnosticSourceAdapter(target, isEnabled);
return diagnostic.Subscribe(adapter, adapter.IsEnabled);
return diagnostic.Subscribe(adapter, (Predicate<string>)adapter.IsEnabled);
}
}
}

Просмотреть файл

@ -116,7 +116,7 @@ namespace Microsoft.Extensions.DiagnosticAdapter.Internal
if (targetType == sourceType || targetType.GetTypeInfo().IsAssignableFrom(sourceType.GetTypeInfo()))
{
// If we find a trivial conversion, then that will work.
// If we find a trivial conversion, then that will work.
return true;
}
@ -128,7 +128,7 @@ namespace Microsoft.Extensions.DiagnosticAdapter.Internal
return false;
}
// This is a combination we haven't seen before, and it *might* support proxy generation, so let's
// This is a combination we haven't seen before, and it *might* support proxy generation, so let's
// start trying.
context.Visited.Add(key, verificationResult);
@ -154,7 +154,7 @@ namespace Microsoft.Extensions.DiagnosticAdapter.Internal
VerificationResult elementResult;
context.Visited.TryGetValue(elementKey, out elementResult);
var proxyType = elementResult?.Type?.GetTypeInfo() ?? (TypeInfo)elementResult?.TypeBuilder;
var proxyType = elementResult?.Type ?? (Type)elementResult?.TypeBuilder;
if (proxyType == null)
{
// No proxy needed for elements.
@ -164,7 +164,7 @@ namespace Microsoft.Extensions.DiagnosticAdapter.Internal
else
{
// We need to proxy each of the elements. Let's generate a type.
GenerateProxyTypeForList(elementKey.Item1, elementKey.Item2, proxyType.AsType(), verificationResult);
GenerateProxyTypeForList(elementKey.Item1, elementKey.Item2, proxyType, verificationResult);
}
return true;
@ -212,7 +212,7 @@ namespace Microsoft.Extensions.DiagnosticAdapter.Internal
return false;
}
// To allow for flexible versioning, we want to allow missing properties in the source.
// To allow for flexible versioning, we want to allow missing properties in the source.
//
// For now we'll just store null, and later generate a stub getter that returns default(T).
var sourceProperty = sourceProperties.Where(p => p.Name == targetProperty.Name).FirstOrDefault();

Просмотреть файл

@ -4,17 +4,14 @@
<PropertyGroup>
<Description>Microsoft extension adapter feature to extend DiagnosticListener. Contains extension methods that extend System.Diagnostics.DiagnosticListener, and enables duck-typing based event handling by using dynamically generated proxy types.</Description>
<TargetFramework>netstandard1.1</TargetFramework>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>diagnosticadapter;diagnosticlistener;diagnostics</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ComponentModel" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Reflection.Emit" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="$(CoreFxVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -3,7 +3,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
</PropertyGroup>