From cccf0ee38051702f698049f15abe990d5bb087a2 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Thu, 19 Sep 2019 16:30:36 -0700 Subject: [PATCH] Initial commit --- .gitattributes | 68 +++++++++++++++++++ .gitignore | 42 ++++++++++++ SignalR30SensorDemo.sln | 25 +++++++ SignalR30SensorWebApplication/Program.cs | 26 +++++++ .../SignalR30SensorWebApplication.csproj | 7 ++ SignalR30SensorWebApplication/Startup.cs | 40 +++++++++++ .../appsettings.Development.json | 9 +++ .../appsettings.json | 10 +++ 8 files changed, 227 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 SignalR30SensorDemo.sln create mode 100644 SignalR30SensorWebApplication/Program.cs create mode 100644 SignalR30SensorWebApplication/SignalR30SensorWebApplication.csproj create mode 100644 SignalR30SensorWebApplication/Startup.cs create mode 100644 SignalR30SensorWebApplication/appsettings.Development.json create mode 100644 SignalR30SensorWebApplication/appsettings.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ff67a91 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,68 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Make sh files under the build directory always have LF as line endings +############################################################################### +*.sh eol=lf + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a23851 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# Folders +artifacts/ +bin/ +obj/ +.dotnet/ +.nuget/ +.packages/ +.tools/ +.vs/ +.vscode/ +node_modules/ +BenchmarkDotNet.Artifacts/ +.gradle/ +src/SignalR/clients/**/dist/ +modules/ + +# File extensions +*.aps +*.binlog +*.dll +*.DS_Store +*.exe +*.idb +*.lib +*.log +*.pch +*.pdb +*.pidb +*.psess +*.res +*.snk +*.suo +*.tlog +*.user +*.userprefs +*.vspx + +# Specific files, typically generated by tools +launchSettings.json +msbuild.ProjectImports.zip +StyleCop.Cache +UpgradeLog.htm diff --git a/SignalR30SensorDemo.sln b/SignalR30SensorDemo.sln new file mode 100644 index 0000000..269e4e0 --- /dev/null +++ b/SignalR30SensorDemo.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29318.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR30SensorWebApplication", "SignalR30SensorWebApplication\SignalR30SensorWebApplication.csproj", "{B9D9E93E-5E14-4573-8F4B-417E70FFC1D0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B9D9E93E-5E14-4573-8F4B-417E70FFC1D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9D9E93E-5E14-4573-8F4B-417E70FFC1D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9D9E93E-5E14-4573-8F4B-417E70FFC1D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9D9E93E-5E14-4573-8F4B-417E70FFC1D0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C3C85B53-EB65-4C55-8500-21115F9B8821} + EndGlobalSection +EndGlobal diff --git a/SignalR30SensorWebApplication/Program.cs b/SignalR30SensorWebApplication/Program.cs new file mode 100644 index 0000000..b3375c0 --- /dev/null +++ b/SignalR30SensorWebApplication/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace SignalR30SensorWebApplication +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/SignalR30SensorWebApplication/SignalR30SensorWebApplication.csproj b/SignalR30SensorWebApplication/SignalR30SensorWebApplication.csproj new file mode 100644 index 0000000..bb9ffce --- /dev/null +++ b/SignalR30SensorWebApplication/SignalR30SensorWebApplication.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp3.0 + + + diff --git a/SignalR30SensorWebApplication/Startup.cs b/SignalR30SensorWebApplication/Startup.cs new file mode 100644 index 0000000..ad65131 --- /dev/null +++ b/SignalR30SensorWebApplication/Startup.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace SignalR30SensorWebApplication +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapGet("/", async context => + { + await context.Response.WriteAsync("Hello World!"); + }); + }); + } + } +} diff --git a/SignalR30SensorWebApplication/appsettings.Development.json b/SignalR30SensorWebApplication/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/SignalR30SensorWebApplication/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/SignalR30SensorWebApplication/appsettings.json b/SignalR30SensorWebApplication/appsettings.json new file mode 100644 index 0000000..d9d9a9b --- /dev/null +++ b/SignalR30SensorWebApplication/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +}