-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add beta8 samples directory. #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>d4f684c8-b6a4-45f0-aca0-0d95632ff946</ProjectGuid> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
public class Program | ||
{ | ||
public static void Main() | ||
{ | ||
Console.WriteLine("Hello World"); | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"dependencies": { | ||
|
||
}, | ||
"commands": { | ||
"ConsoleApp": "ConsoleApp" | ||
}, | ||
"frameworks": { | ||
"dnx451": { }, | ||
"dnxcore50": { | ||
"dependencies": { | ||
"System.Console": "4.0.0-beta-beta8" | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
samples/1.0.0-beta8/HelloMvc/Controllers/HomeController.cs
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.AspNet.Mvc; | ||
using MvcSample.Web.Models; | ||
|
||
namespace MvcSample.Web | ||
{ | ||
public class HomeController : Controller | ||
{ | ||
public IActionResult Index() | ||
{ | ||
return View(CreateUser()); | ||
} | ||
|
||
public User CreateUser() | ||
{ | ||
User user = new User() | ||
{ | ||
Name = "My name", | ||
Address = "My address" | ||
}; | ||
|
||
return user; | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM microsoft/aspnet:1.0.0-beta8 | ||
|
||
COPY project.json /app/ | ||
WORKDIR /app | ||
RUN ["dnu", "restore"] | ||
COPY . /app | ||
|
||
EXPOSE 5004 | ||
ENTRYPOINT ["dnx", "-p", "project.json", "kestrel"] |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>78627bb3-851e-4c1a-91c0-629fc7c15f8f</ProjectGuid> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<DevelopmentServerPort>26425</DevelopmentServerPort> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace MvcSample.Web.Models | ||
{ | ||
public class User | ||
{ | ||
[Required] | ||
[MinLength(4)] | ||
public string Name { get; set; } | ||
public string Address { get; set; } | ||
public int Age { get; set; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
samples/1.0.0-beta8/HelloMvc/Properties/launchSettings.json
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNET_ENV": "Development" | ||
} | ||
}, | ||
"kestrel": { | ||
"commandName": "kestrel", | ||
"launchBrowser": true, | ||
"launchUrl": "http://localhost:5004" | ||
}, | ||
"web": { | ||
"commandName": "web", | ||
"launchBrowser": true, | ||
"launchUrl": "http://localhost:5001" | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.AspNet.Builder; | ||
using Microsoft.Framework.DependencyInjection; | ||
using Microsoft.Framework.Logging; | ||
|
||
namespace HelloMvc | ||
{ | ||
public class Startup | ||
{ | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services.AddMvc(); | ||
} | ||
|
||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) | ||
{ | ||
loggerFactory.AddConsole(); | ||
|
||
app.UseDeveloperExceptionPage(); | ||
|
||
app.UseMvcWithDefaultRoute(); | ||
|
||
app.UseWelcomePage(); | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@using MvcSample.Web.Models | ||
@model User | ||
@{ | ||
Layout = "/Views/Shared/_Layout.cshtml"; | ||
ViewBag.Title = "Home Page"; | ||
string helloClass = null; | ||
} | ||
|
||
<div class="jumbotron"> | ||
<h1>ASP.NET</h1> | ||
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p> | ||
<p><a href="http://asp.net" class="btn btn-primary btn-large">Learn more »</a></p> | ||
</div> | ||
<div class="row"> | ||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3> | ||
</div> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>@ViewBag.Title - My ASP.NET Application</title> | ||
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" /> | ||
</head> | ||
<body> | ||
<div class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
</div> | ||
<div class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><a href="/">Home</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container body-content"> | ||
@RenderBody() | ||
<hr /> | ||
<address> | ||
@if (@Model != null) | ||
{ | ||
@Model.Address | ||
} | ||
</address> | ||
<footer> | ||
<p>© @DateTime.Now.Year - My ASP.NET Application</p> | ||
</footer> | ||
</div> | ||
</body> | ||
</html> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"version": "1.0.0-beta8", | ||
"webroot": "wwwroot", | ||
"exclude": [ | ||
"wwwroot" | ||
], | ||
"packExclude": [ | ||
"**.kproj", | ||
"**.user", | ||
"**.vspscc" | ||
], | ||
"dependencies": { | ||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", | ||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8", | ||
"Microsoft.AspNet.Mvc": "6.0.0-beta8", | ||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta8", | ||
"Microsoft.Framework.Logging.Console": "1.0.0-beta8" | ||
}, | ||
"commands": { | ||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001", | ||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5004" | ||
}, | ||
"frameworks": { | ||
"dnx451": { }, | ||
"dnxcore50": { } | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM microsoft/aspnet:1.0.0-beta8 | ||
|
||
COPY project.json /app/ | ||
WORKDIR /app | ||
RUN ["dnu", "restore"] | ||
COPY . /app | ||
|
||
EXPOSE 5004 | ||
ENTRYPOINT ["dnx", "-p", "project.json", "kestrel"] |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>8d4b2ab5-c2d2-4ee0-b751-f4126c7d0539</ProjectGuid> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<DevelopmentServerPort>26235</DevelopmentServerPort> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<clear /> | ||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetbeta8/api/v3/index.json" /> | ||
<add key="NuGetorg" value="https://api.nuget.org/v3/index.json" /> | ||
<!--<add key="NuGetorg2" value="https://nuget.org/api/v2/" />--> | ||
</packageSources> | ||
</configuration> |
21 changes: 21 additions & 0 deletions
21
samples/1.0.0-beta8/HelloWeb/Properties/launchSettings.json
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNET_ENV": "Development" | ||
} | ||
}, | ||
"kestrel": { | ||
"commandName": "kestrel", | ||
"launchBrowser": true, | ||
"launchUrl": "http://localhost:5004" | ||
}, | ||
"web": { | ||
"commandName": "web", | ||
"launchBrowser": true, | ||
"launchUrl": "http://localhost:5001" | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Microsoft.AspNet.Builder; | ||
using Microsoft.Framework.Logging; | ||
|
||
namespace HelloWeb | ||
{ | ||
public class Startup | ||
{ | ||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) | ||
{ | ||
loggerFactory.AddConsole(); | ||
app.UseStaticFiles(); | ||
app.UseWelcomePage(); | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"version": "1.0.0-beta8", | ||
"webroot": "wwwroot", | ||
"exclude": [ | ||
"wwwroot" | ||
], | ||
"packExclude": [ | ||
"**.kproj", | ||
"**.user", | ||
"**.vspscc" | ||
], | ||
"dependencies": { | ||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", | ||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8", | ||
"Microsoft.AspNet.Hosting": "1.0.0-beta8", | ||
"Microsoft.AspNet.StaticFiles": "1.0.0-beta8", | ||
"Microsoft.Framework.Logging.Console": "1.0.0-beta8" | ||
}, | ||
"commands": { | ||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001", | ||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5004" | ||
}, | ||
"frameworks": { | ||
"dnx451": { }, | ||
"dnxcore50": { } | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<clear /> | ||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetbeta8/api/v3/index.json" /> | ||
<add key="NuGetorg" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to change this tomorrow :)