Skip to content

Commit d69fa97

Browse files
Merge pull request #35 from OpenTouryoProject/develop
Release work ( ~ June 2020)
2 parents edc7b87 + c0ab88b commit d69fa97

1,040 files changed

Lines changed: 21867 additions & 300494 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29519.87
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPA_Sample", "SPA_Sample\SPA_Sample.csproj", "{FCDE8444-AC04-4ACA-92A2-5AB6B4F1A474}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrontendHost", "FrontendHost\FrontendHost.csproj", "{E4AC93C0-3766-420C-9455-A05B99ADC6B2}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{FCDE8444-AC04-4ACA-92A2-5AB6B4F1A474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{FCDE8444-AC04-4ACA-92A2-5AB6B4F1A474}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{FCDE8444-AC04-4ACA-92A2-5AB6B4F1A474}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{FCDE8444-AC04-4ACA-92A2-5AB6B4F1A474}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{E4AC93C0-3766-420C-9455-A05B99ADC6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E4AC93C0-3766-420C-9455-A05B99ADC6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E4AC93C0-3766-420C-9455-A05B99ADC6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E4AC93C0-3766-420C-9455-A05B99ADC6B2}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {19BFAF05-CA82-4AED-B021-DC6228FC5E56}
23+
SolutionGuid = {73619171-9A62-4CAF-B1F2-C6800F8D02CD}
2424
EndGlobalSection
2525
EndGlobal
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Mvc;
7+
using Microsoft.Extensions.Logging;
8+
using FrontendHost.Models;
9+
10+
namespace FrontendHost.Controllers
11+
{
12+
public class HomeController : Controller
13+
{
14+
private readonly ILogger<HomeController> _logger;
15+
16+
public HomeController(ILogger<HomeController> logger)
17+
{
18+
_logger = logger;
19+
}
20+
21+
public IActionResult Index()
22+
{
23+
ViewData["h1"] = "Welcome";
24+
return View();
25+
}
26+
27+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
28+
public IActionResult Error()
29+
{
30+
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
31+
}
32+
}
33+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
//**********************************************************************************
2+
//* テスト・コントローラー
3+
//**********************************************************************************
4+
5+
// テスト・コントローラーなので、必要に応じて流用 or 削除して下さい。
6+
7+
//**********************************************************************************
8+
//* クラス名 :ValuesController
9+
//* クラス日本語名 :疎通確認用
10+
//*
11+
//* 作成日時 :-
12+
//* 作成者 :生技
13+
//* 更新履歴 :
14+
//*
15+
//* 日時 更新者 内容
16+
//* ---------- ---------------- -------------------------------------------------
17+
//* 2018/09/07 西野 大介 新規作成
18+
//**********************************************************************************
19+
20+
using System;
21+
using System.Linq;
22+
using System.Collections.Generic;
23+
24+
using Microsoft.AspNetCore.Mvc;
25+
using Microsoft.AspNetCore.Cors;
26+
27+
namespace ReactReduxTemplate.Controllers
28+
{
29+
[ApiController]
30+
[Route("api/[controller]/[action]")]
31+
public class SampleDataController : ControllerBase
32+
{
33+
/// <summary>Summaries</summary>
34+
private static string[] Summaries = new[]
35+
{
36+
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
37+
};
38+
39+
/// <summary>
40+
/// GET api/sampledata/weatherforecasts?startDateIndex=1
41+
/// </summary>
42+
/// <param name="startDateIndex">int</param>
43+
/// <returns>IEnumerable(WeatherForecast)</returns>
44+
[HttpGet()]
45+
public IEnumerable<WeatherForecast> WeatherForecasts(int startDateIndex)
46+
{
47+
var rng = new Random();
48+
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
49+
{
50+
DateFormatted = DateTime.Now.AddDays(index + startDateIndex).ToString("d"),
51+
TemperatureC = rng.Next(-20, 55),
52+
Summary = Summaries[rng.Next(Summaries.Length)]
53+
});
54+
}
55+
56+
/// <summary>WeatherForecast</summary>
57+
public class WeatherForecast
58+
{
59+
public string DateFormatted { get; set; }
60+
public int TemperatureC { get; set; }
61+
public string Summary { get; set; }
62+
63+
public int TemperatureF
64+
{
65+
get
66+
{
67+
return 32 + (int)(TemperatureC / 0.5556);
68+
}
69+
}
70+
}
71+
}
72+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
9+
</ItemGroup>
10+
11+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
3+
namespace FrontendHost.Models
4+
{
5+
public class ErrorViewModel
6+
{
7+
public string RequestId { get; set; }
8+
9+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10+
}
11+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.Hosting;
8+
using Microsoft.Extensions.Logging;
9+
10+
namespace FrontendHost
11+
{
12+
public class Program
13+
{
14+
public static void Main(string[] args)
15+
{
16+
CreateHostBuilder(args).Build().Run();
17+
}
18+
19+
public static IHostBuilder CreateHostBuilder(string[] args) =>
20+
Host.CreateDefaultBuilder(args)
21+
.ConfigureWebHostDefaults(webBuilder =>
22+
{
23+
webBuilder.UseStartup<Startup>();
24+
});
25+
}
26+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:3000",
7+
"sslPort": 0
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"FrontendHost": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"environmentVariables": {
22+
"ASPNETCORE_ENVIRONMENT": "Development"
23+
},
24+
"applicationUrl": "https://localhost:5001;http://localhost:5000"
25+
}
26+
}
27+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm i
2+
pause
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm run-script build
2+
pause
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Builder;
6+
using Microsoft.AspNetCore.Hosting;
7+
using Microsoft.AspNetCore.HttpsPolicy;
8+
using Microsoft.Extensions.Configuration;
9+
using Microsoft.Extensions.DependencyInjection;
10+
using Microsoft.Extensions.Hosting;
11+
12+
namespace FrontendHost
13+
{
14+
public class Startup
15+
{
16+
public Startup(IConfiguration configuration)
17+
{
18+
Configuration = configuration;
19+
}
20+
21+
public IConfiguration Configuration { get; }
22+
23+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
24+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
25+
{
26+
if (env.IsDevelopment())
27+
{
28+
app.UseDeveloperExceptionPage();
29+
}
30+
else
31+
{
32+
// app.UseExceptionHandler("/Home/Error");
33+
// The default HSTS value is 30 days.
34+
// You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
35+
app.UseHsts();
36+
}
37+
38+
app.UseHttpsRedirection();
39+
40+
app.UseDefaultFiles();
41+
app.UseStaticFiles();
42+
43+
app.UseRouting();
44+
45+
//app.UseAuthentication();
46+
//app.UseAuthorization();
47+
48+
//.AllowCredentials());
49+
50+
app.UseEndpoints(endpoints =>
51+
{
52+
endpoints.MapControllers();
53+
});
54+
}
55+
56+
/// <summary>
57+
/// This method gets called by the runtime. Use this method to add services to the container.
58+
/// </summary>
59+
/// <param name="services">IServiceCollection</param>
60+
public void ConfigureServices(IServiceCollection services)
61+
{
62+
//services.AddControllersWithViews();
63+
64+
// 構成情報から、AppConfiguration SectionをAppConfiguration Classへバインドするようなケース。
65+
//services.Configure<AppConfiguration>(Configuration.GetSection("AppConfiguration"));
66+
67+
// Core 3.0のテンプレートではUseMvcの
68+
// 代わりにこれらを使用するようになった。
69+
services
70+
.AddControllers()// WebAPI
71+
.AddNewtonsoftJson();// JSON シリアライザの変更
72+
73+
//services.AddControllersWithViews(); // MVC & WebAPI
74+
// services.AddRazorPages(); // Razor Page
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)