Transition to netstandard.
- dotnet5.X => netstandard1.y (where y = x-1). - DNXCore50 => netstandardapp1.5. - Applied the same changes to ifdefs.
This commit is contained in:
parent
9f675abbca
commit
b00c1c1dc7
|
|
@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
|
||||||
RegexOptions.None,
|
RegexOptions.None,
|
||||||
Constants.RegexMatchTimeout);
|
Constants.RegexMatchTimeout);
|
||||||
|
|
||||||
#if !DOTNET5_4
|
#if !NETSTANDARD1_3
|
||||||
private readonly TagHelperDesignTimeDescriptorFactory _designTimeDescriptorFactory;
|
private readonly TagHelperDesignTimeDescriptorFactory _designTimeDescriptorFactory;
|
||||||
#endif
|
#endif
|
||||||
private readonly bool _designTime;
|
private readonly bool _designTime;
|
||||||
|
|
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
|
||||||
/// </param>
|
/// </param>
|
||||||
public TagHelperDescriptorFactory(bool designTime)
|
public TagHelperDescriptorFactory(bool designTime)
|
||||||
{
|
{
|
||||||
#if !DOTNET5_4
|
#if !NETSTANDARD1_3
|
||||||
if (designTime)
|
if (designTime)
|
||||||
{
|
{
|
||||||
_designTimeDescriptorFactory = new TagHelperDesignTimeDescriptorFactory();
|
_designTimeDescriptorFactory = new TagHelperDesignTimeDescriptorFactory();
|
||||||
|
|
@ -127,7 +127,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
|
||||||
{
|
{
|
||||||
TagHelperDesignTimeDescriptor typeDesignTimeDescriptor = null;
|
TagHelperDesignTimeDescriptor typeDesignTimeDescriptor = null;
|
||||||
|
|
||||||
#if !DOTNET5_4
|
#if !NETSTANDARD1_3
|
||||||
if (_designTime)
|
if (_designTime)
|
||||||
{
|
{
|
||||||
typeDesignTimeDescriptor = _designTimeDescriptorFactory.CreateDescriptor(type);
|
typeDesignTimeDescriptor = _designTimeDescriptorFactory.CreateDescriptor(type);
|
||||||
|
|
@ -706,7 +706,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
|
||||||
{
|
{
|
||||||
TagHelperAttributeDesignTimeDescriptor propertyDesignTimeDescriptor = null;
|
TagHelperAttributeDesignTimeDescriptor propertyDesignTimeDescriptor = null;
|
||||||
|
|
||||||
#if !DOTNET5_4
|
#if !NETSTANDARD1_3
|
||||||
if (_designTime)
|
if (_designTime)
|
||||||
{
|
{
|
||||||
propertyDesignTimeDescriptor = _designTimeDescriptorFactory.CreateAttributeDescriptor(property);
|
propertyDesignTimeDescriptor = _designTimeDescriptorFactory.CreateAttributeDescriptor(property);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
#if !DOTNET5_4 // Cannot accurately resolve the location of the documentation XML file in coreclr.
|
#if !NETSTANDARD1_3 // Cannot accurately resolve the location of the documentation XML file in coreclr.
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
#if !DOTNET5_4
|
#if !NETSTANDARD1_3
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
|
||||||
|
|
||||||
public bool IsWhiteSpace { get; private set; } = true;
|
public bool IsWhiteSpace { get; private set; } = true;
|
||||||
|
|
||||||
#if DOTNET5_4
|
#if NETSTANDARD1_3
|
||||||
// This is an abstract method in DNXCore
|
// This is an abstract method in DNXCore
|
||||||
public override void Write(char value)
|
public override void Write(char value)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true,
|
||||||
"keyFile": "../../tools/Key.snk",
|
"keyFile": "../../tools/Key.snk",
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true,
|
||||||
"nowarn": [ "CS1591" ],
|
"nowarn": [
|
||||||
|
"CS1591"
|
||||||
|
],
|
||||||
"xmlDoc": true
|
"xmlDoc": true
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -36,12 +38,15 @@
|
||||||
},
|
},
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
},
|
},
|
||||||
"dotnet5.4": {
|
"netstandard1.3": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Reflection.Extensions": "4.0.1-*",
|
"System.Reflection.Extensions": "4.0.1-*",
|
||||||
"System.Reflection.TypeExtensions": "4.1.0-*",
|
"System.Reflection.TypeExtensions": "4.1.0-*",
|
||||||
"System.Text.RegularExpressions": "4.0.12-*"
|
"System.Text.RegularExpressions": "4.0.12-*"
|
||||||
}
|
},
|
||||||
|
"imports": [
|
||||||
|
"dotnet5.4"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,10 @@
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {},
|
"net451": {},
|
||||||
"dotnet5.4": {}
|
"netstandard1.3": {
|
||||||
|
"imports": [
|
||||||
|
"dotnet5.4"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.Razor.Editor
|
||||||
RazorEditorTrace.TraceLine(RazorResources.FormatTrace_BackgroundThreadStart(fileNameOnly));
|
RazorEditorTrace.TraceLine(RazorResources.FormatTrace_BackgroundThreadStart(fileNameOnly));
|
||||||
EnsureOnThread();
|
EnsureOnThread();
|
||||||
|
|
||||||
#if DOTNET5_4
|
#if NETSTANDARD1_3
|
||||||
var spinWait = new SpinWait();
|
var spinWait = new SpinWait();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -422,7 +422,7 @@ namespace Microsoft.AspNetCore.Razor.Editor
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RazorEditorTrace.TraceLine(RazorResources.FormatTrace_NoChangesArrived(fileNameOnly));
|
RazorEditorTrace.TraceLine(RazorResources.FormatTrace_NoChangesArrived(fileNameOnly));
|
||||||
#if DOTNET5_4
|
#if NETSTANDARD1_3
|
||||||
// This does the equivalent of thread.yield under the covers.
|
// This does the equivalent of thread.yield under the covers.
|
||||||
spinWait.SpinOnce();
|
spinWait.SpinOnce();
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true,
|
||||||
"keyFile": "../../tools/Key.snk",
|
"keyFile": "../../tools/Key.snk",
|
||||||
"nowarn": [ "CS1591" ],
|
"nowarn": [
|
||||||
|
"CS1591"
|
||||||
|
],
|
||||||
"xmlDoc": true
|
"xmlDoc": true
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -19,14 +21,17 @@
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {},
|
"net451": {},
|
||||||
"dotnet5.4": {
|
"netstandard1.3": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.IO.FileSystem": "4.0.1-*",
|
"System.IO.FileSystem": "4.0.1-*",
|
||||||
"System.Linq": "4.1.0-*",
|
"System.Linq": "4.1.0-*",
|
||||||
"System.Runtime.Extensions": "4.1.0-*",
|
"System.Runtime.Extensions": "4.1.0-*",
|
||||||
"System.Security.Cryptography.Algorithms": "4.0.0-*",
|
"System.Security.Cryptography.Algorithms": "4.0.0-*",
|
||||||
"System.Threading.Thread": "4.0.0-*"
|
"System.Threading.Thread": "4.0.0-*"
|
||||||
}
|
},
|
||||||
|
"imports": [
|
||||||
|
"dotnet5.4"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1982,7 +1982,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
|
||||||
}
|
}
|
||||||
|
|
||||||
// TagHelperDesignTimeDescriptors are not created in CoreCLR.
|
// TagHelperDesignTimeDescriptors are not created in CoreCLR.
|
||||||
#if !DNXCORE50
|
#if !NETSTANDARDAPP1_5
|
||||||
public static TheoryData OutputElementHintData
|
public static TheoryData OutputElementHintData
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
#if !DNXCORE50
|
#if !NETSTANDARDAPP1_5
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
#if !DNXCORE50
|
#if !NETSTANDARDAPP1_5
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,11 @@
|
||||||
},
|
},
|
||||||
"testRunner": "xunit",
|
"testRunner": "xunit",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnxcore50": {
|
"netstandardapp1.5": {
|
||||||
"imports": "portable-net451+win8",
|
"imports": [
|
||||||
|
"dnxcore50",
|
||||||
|
"portable-net451+win8"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotnet-test-xunit": "1.0.0-dev-*"
|
"dotnet-test-xunit": "1.0.0-dev-*"
|
||||||
}
|
}
|
||||||
|
|
@ -34,4 +37,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
#if DNXCORE50
|
#if NETSTANDARDAPP1_5
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
#endif
|
#endif
|
||||||
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
#if DNXCORE50
|
#if NETSTANDARDAPP1_5
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
#endif
|
#endif
|
||||||
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Text
|
||||||
RunDisposeTest(r => r.Dispose());
|
RunDisposeTest(r => r.Dispose());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DNXCORE50
|
#if !NETSTANDARDAPP1_5
|
||||||
[Fact]
|
[Fact]
|
||||||
public void CloseDisposesSourceReader()
|
public void CloseDisposesSourceReader()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Text
|
||||||
RunDisposeTest(r => r.Dispose());
|
RunDisposeTest(r => r.Dispose());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DNXCORE50
|
#if !NETSTANDARDAPP1_5
|
||||||
[Fact]
|
[Fact]
|
||||||
public void CloseDisposesSourceReader()
|
public void CloseDisposesSourceReader()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,11 @@
|
||||||
},
|
},
|
||||||
"testRunner": "xunit",
|
"testRunner": "xunit",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnxcore50": {
|
"netstandardapp1.5": {
|
||||||
"imports": "portable-net451+win8",
|
"imports": [
|
||||||
|
"dnxcore50",
|
||||||
|
"portable-net451+win8"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"moq.netcore": "4.4.0-beta8",
|
"moq.netcore": "4.4.0-beta8",
|
||||||
"dotnet-test-xunit": "1.0.0-dev-*"
|
"dotnet-test-xunit": "1.0.0-dev-*"
|
||||||
|
|
@ -39,4 +42,4 @@
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true,
|
||||||
"keyFile": "../../tools/Key.snk"
|
"keyFile": "../../tools/Key.snk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue