This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170601-03" /> | |
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" /> | |
<PackageReference Include="xunit" Version="2.3.0-beta3-build3705" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | |
<DefineConstants>TRACE;DEBUG;ASSERT;NETCOREAPP2_0</DefineConstants> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main(string[] args) | |
{ | |
var config = new ConfigurationBuilder() | |
.AddJsonFile("hosting.json", optional: true) | |
.AddCommandLine(args) | |
.Build(); | |
var host = new WebHostBuilder() | |
.UseConfiguration(config) | |
.UseKestrel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. | |
namespace Microsoft.AspNetCore.Hosting | |
{ | |
public static class WebHostDefaults | |
{ | |
public static readonly string ApplicationKey = "applicationName"; | |
public static readonly string StartupAssemblyKey = "startupAssembly"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AppSettings": { | |
"Setting1": "value1", | |
"Setting2": "value2" | |
}, | |
"Hosting": { | |
"urls": "https://*:5000", | |
"environment": "Production" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = new ConfigurationBuilder() | |
.AddJsonFile("appsettings.json") | |
.build(); | |
var host = new WebHostBuilder() | |
.UseConfiguration(config.GetSection("Hosting")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8-jdk-stretch | |
ENV PWSH_VERSION 6.0.4* | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && apt-get install --no-install-recommends -y curl gnupg apt-transport-https \ | |
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ | |
&& sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list' \ | |
&& apt-get update && apt-get install --no-install-recommends -y powershell=${PWSH_VERSION} \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
..... | |
[Fact] | |
public void CreationTimeUtc_Bug() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IdentityModel.Tokens.Jwt; | |
using System.Security.Claims; | |
using System.Text; | |
using Microsoft.IdentityModel.Tokens; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ |
OlderNewer