Add a new feed dotnet-core
This is the *new* and most correct feed for our developer builds. Leaving the old ones there for now because the other ASP.NET Repos also left them there.
This commit is contained in:
parent
f2c78b0776
commit
d3bdb987b0
|
|
@ -5,6 +5,7 @@
|
||||||
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
|
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
|
||||||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
|
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
|
||||||
$(RestoreSources);
|
$(RestoreSources);
|
||||||
|
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
|
||||||
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
|
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
|
||||||
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json
|
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json
|
||||||
</RestoreSources>
|
</RestoreSources>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// 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.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using Microsoft.AspNetCore.Razor.Language;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Razor
|
|
||||||
{
|
|
||||||
public static class BlazorConfiguration
|
|
||||||
{
|
|
||||||
public static readonly RazorConfiguration Default = new RazorConfiguration(
|
|
||||||
RazorLanguageVersion.Version_2_1,
|
|
||||||
"Blazor-0.1",
|
|
||||||
Array.Empty<RazorExtension>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -17,30 +17,15 @@ namespace Microsoft.AspNetCore.Blazor.Razor
|
||||||
|
|
||||||
static BlazorExtensionInitializer()
|
static BlazorExtensionInitializer()
|
||||||
{
|
{
|
||||||
// RazorConfiguration is changing between 15.7 and preview2 builds of Razor, this is a reflection-based
|
DeclarationConfiguration = RazorConfiguration.Create(
|
||||||
// workaround.
|
RazorLanguageVersion.Version_2_1, // Cannot use experimental until 15.7p4
|
||||||
DeclarationConfiguration = Create("BlazorDeclaration-0.1");
|
"BlazorDeclaration-0.1",
|
||||||
DefaultConfiguration = Create("Blazor-0.1");
|
Array.Empty<RazorExtension>());
|
||||||
|
|
||||||
RazorConfiguration Create(string configurationName)
|
DefaultConfiguration = RazorConfiguration.Create(
|
||||||
{
|
RazorLanguageVersion.Version_2_1,
|
||||||
var args = new object[] { RazorLanguageVersion.Version_2_1, configurationName, Array.Empty<RazorExtension>(), };
|
"Blazor-0.1",
|
||||||
|
Array.Empty<RazorExtension>());
|
||||||
MethodInfo method;
|
|
||||||
ConstructorInfo constructor;
|
|
||||||
if ((method = typeof(RazorConfiguration).GetMethod("Create", BindingFlags.Public | BindingFlags.Static)) != null)
|
|
||||||
{
|
|
||||||
return (RazorConfiguration)method.Invoke(null, args);
|
|
||||||
}
|
|
||||||
else if ((constructor = typeof(RazorConfiguration).GetConstructors().FirstOrDefault()) != null)
|
|
||||||
{
|
|
||||||
return (RazorConfiguration)constructor.Invoke(args);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Can't create a configuration. This is bad.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Register(RazorProjectEngineBuilder builder)
|
public static void Register(RazorProjectEngineBuilder builder)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue