Skip to content

Commit

Permalink
merge (#8)
Browse files Browse the repository at this point in the history
merge

Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
Co-authored-by: Justin Kotalik <jkotalik12@gmail.com>
Co-authored-by: Kristian Hellang <kristian@hellang.com>
Co-authored-by: Ajay Bhargav Baaskaran <ajaybhargavb@gmail.com>
Co-authored-by: null <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Hao Kung <HaoK@users.noreply.github.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Thomas Levesque <thomaslevesque@users.noreply.github.com>
  • Loading branch information
12 people authored Jun 26, 2019
2 parents cefeb6b + 785cd9a commit 0bbff69
Show file tree
Hide file tree
Showing 328 changed files with 2,489 additions and 1,996 deletions.
7 changes: 1 addition & 6 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<!--
Restore sources should be defined in eng/Versions.props.
The only allowed feeds here are dotnet-core and nuget.org, which is required to work around
https://github.com/Microsoft/msbuild/issues/2914
-->
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
Expand Down
2 changes: 2 additions & 0 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
<FileExtensionSignInfo Include=".cab" CertificateName="None" />
<FileExtensionSignInfo Include=".msi" CertificateName="None" />

<!--
Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
Expand Down
388 changes: 194 additions & 194 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

194 changes: 97 additions & 97 deletions eng/Versions.props

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion eng/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>


<!-- Workaround for https://github.com/dotnet/arcade/issues/204 -->
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.BuildTasks" PrivateAssets="All" Version="$(InternalAspNetCoreBuildTasksPackageVersion)" IsImplicitlyDefined="true" />
Expand All @@ -58,4 +57,10 @@
</KnownFrameworkReference>
</ItemGroup>

<!-- Work around https://github.com/dotnet/cli/issues/11378. -->
<Target Name="_WorkaroundNetStandard" AfterTargets="ResolvePackageAssets">
<ItemGroup>
<TransitiveFrameworkReference Remove="NETStandard.Library" />
</ItemGroup>
</Target>
</Project>
4 changes: 0 additions & 4 deletions eng/targets/ReferenceAssembly.targets
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
</ItemGroup>

<PropertyGroup>
<ProjectListFile>$(MSBuildThisFileDirectory)..\eng\ProjectReferences.props</ProjectListFile>
<RefsTargetFramework>$(TargetFrameworks)</RefsTargetFramework>
<RefsTargetFramework Condition="'$(RefsTargetFramework)' == ''">$(TargetFramework)</RefsTargetFramework>

<ReferencesContent>
<![CDATA[
<ItemGroup Condition="'%24(TargetFramework)' == '$(TargetFramework)'">
Expand Down
10 changes: 6 additions & 4 deletions eng/tools/RepoTasks/CreateFrameworkListFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class CreateFrameworkListFile : Task
[Required]
public string TargetFile { get; set; }

public string ManagedRoot { get; set; } = "";

public string NativeRoot { get; set; } = "";

/// <summary>
/// Extra attributes to place on the root node.
///
Expand All @@ -46,7 +50,6 @@ public override bool Execute()
{
Item = item,
Filename = Path.GetFileName(item.ItemSpec),
TargetPath = item.GetMetadata("TargetPath"),
AssemblyName = FileUtilities.GetAssemblyName(item.ItemSpec),
FileVersion = FileUtilities.GetFileVersion(item.ItemSpec),
IsNative = item.GetMetadata("IsNativeImage") == "true",
Expand All @@ -55,15 +58,14 @@ public override bool Execute()
.Where(f =>
!f.IsSymbolFile &&
(f.Filename.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || f.IsNative))
.OrderBy(f => f.TargetPath, StringComparer.Ordinal)
.ThenBy(f => f.Filename, StringComparer.Ordinal))
.OrderBy(f => f.Filename, StringComparer.Ordinal))
{
var element = new XElement(
"File",
new XAttribute("Type", f.IsNative ? "Native" : "Managed"),
new XAttribute(
"Path",
Path.Combine(f.TargetPath, f.Filename).Replace('\\', '/')));
Path.Combine(f.IsNative ? NativeRoot : ManagedRoot, f.Filename).Replace('\\', '/')));

if (f.AssemblyName != null)
{
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "3.0.100-preview5-011568"
"version": "3.0.100-preview6-012264"
},
"tools": {
"dotnet": "3.0.100-preview5-011568",
"dotnet": "3.0.100-preview6-012264",
"runtimes": {
"dotnet/x64": [
"$(MicrosoftNETCoreAppRuntimeVersion)"
Expand Down
8 changes: 3 additions & 5 deletions src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ public void TryValidateTokenSet_CookieTokenMissing()
var ex = Assert.Throws<ArgumentNullException>(
() => tokenProvider.TryValidateTokenSet(httpContext, null, fieldtoken, out message));

var trimmed = ex.Message.Substring(0, ex.Message.IndexOf(Environment.NewLine));
Assert.Equal(@"The required antiforgery cookie token must be provided.", trimmed);
Assert.StartsWith(@"The required antiforgery cookie token must be provided.", ex.Message);
}

[Fact]
Expand All @@ -307,8 +306,7 @@ public void TryValidateTokenSet_FieldTokenMissing()
var ex = Assert.Throws<ArgumentNullException>(
() => tokenProvider.TryValidateTokenSet(httpContext, cookieToken, null, out message));

var trimmed = ex.Message.Substring(0, ex.Message.IndexOf(Environment.NewLine));
Assert.Equal("The required antiforgery request token must be provided.", trimmed);
Assert.StartsWith("The required antiforgery request token must be provided.", ex.Message);
}

[Fact]
Expand Down Expand Up @@ -625,4 +623,4 @@ public override string Name
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ else

protected override async Task OnInitAsync()
{
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("api/SampleData/WeatherForecasts");
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("weatherforecast");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,33 @@

namespace BlazorHosted_CSharp.Server.Controllers
{
[Route("api/[controller]")]
public class SampleDataController : Controller
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static string[] Summaries = new[]
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

[HttpGet("[action]")]
public IEnumerable<WeatherForecast> WeatherForecasts()
private readonly ILogger<WeatherForecastController> _logger;

public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}

[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
});
})
.ToArray();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ public CascadingValue() { }
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}

public partial class PageDisplay : Microsoft.AspNetCore.Components.IComponent
{
public PageDisplay() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}
}

namespace Microsoft.AspNetCore.Components.Forms
Expand Down Expand Up @@ -231,24 +246,6 @@ void System.IDisposable.Dispose() { }
}
}

namespace Microsoft.AspNetCore.Components.Layouts
{
public partial class PageDisplay : Microsoft.AspNetCore.Components.IComponent
{
public PageDisplay() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}
}

namespace Microsoft.AspNetCore.Components.Routing
{
public partial class NavLink : Microsoft.AspNetCore.Components.IComponent, System.IDisposable
Expand All @@ -270,7 +267,9 @@ public Router() { }
public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment NotFoundContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment<AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Dispose() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@

<div id="duplicate-on-element-override">
<DuplicateAttributesOnElementChildComponent
BoolAttributeBefore="true"
StringAttributeBefore="original-text"
UnmatchedValues="@elementValues"
BoolAttributeAfter="false"
StringAttributeAfter="other-text" />
</div>

@functions {
void SomeMethod()
{
}

Dictionary<string, object> elementValues = new Dictionary<string, object>()
{
{ "bool", true },
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@if (StringAttributeBefore != null)
{
<div string="@StringAttributeBefore"
bool="@BoolAttributeBefore"
@attributes="@UnmatchedValues">
</div>
}
else
{
<div @attributes="@UnmatchedValues"
string="@StringAttributeAfter"
bool="@BoolAttributeAfter">
</div>
}

@code {
[Parameter] public string StringAttributeBefore { get; private set; }
[Parameter] public bool BoolAttributeBefore { get; private set; }
[Parameter] public string StringAttributeAfter { get; private set; }
[Parameter] public bool? BoolAttributeAfter { get; private set; }

[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> UnmatchedValues { get; private set; }
}
4 changes: 4 additions & 0 deletions src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant

<!-- NuGet appends target framework to this value. Example: runtimes/win-x64/lib/netcoreapp3.0/ -->
<BuildOutputTargetFolder>runtimes/$(RuntimeIdentifier)/lib/</BuildOutputTargetFolder>
<!-- We still need the native path to these assets though for the RuntimeList.xml manifest -->
<ManagedAssetsPackagePath>$(BuildOutputTargetFolder)$(DefaultNetCoreTargetFramework)</ManagedAssetsPackagePath>
<!-- Target framework is not append to this because native assets to not have a target framework. -->
<NativeAssetsPackagePath>runtimes/$(RuntimeIdentifier)/native/</NativeAssetsPackagePath>

Expand Down Expand Up @@ -457,6 +459,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<RepoTasks.CreateFrameworkListFile
Files="@(SharedFxContent)"
TargetFile="$(FrameworkListOutputPath)"
ManagedRoot="$(ManagedAssetsPackagePath)"
NativeRoot="$(NativeAssetsPackagePath)"
RootAttributes="@(FrameworkListRootAttributes)" />

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Hosting/Hosting/src/GenericHost/GenericWebHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ public GenericWebHostBuilder(IHostBuilder builder)
options.HostingStartupExceptions = _hostingStartupErrors;
});

services.AddHostedService<GenericWebHostService>();

// REVIEW: This is bad since we don't own this type. Anybody could add one of these and it would mess things up
// We need to flow this differently
var listener = new DiagnosticListener("Microsoft.AspNetCore");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.Hosting
{
Expand All @@ -9,6 +10,7 @@ public static IHostBuilder ConfigureWebHost(this IHostBuilder builder, Action<IW
{
var webhostBuilder = new GenericWebHostBuilder(builder);
configure(webhostBuilder);
builder.ConfigureServices((context, services) => services.AddHostedService<GenericWebHostService>());
return builder;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal GenericWebHostBuilderWrapper(HostBuilder hostBuilder)
// This is the only one that doesn't pass through
public IWebHost Build()
{
_hostBuilder.ConfigureServices((context, services) => services.AddHostedService<GenericWebHostService>());
return new GenericWebHost(_hostBuilder.Build());
}

Expand Down
Loading

0 comments on commit 0bbff69

Please sign in to comment.