From 0f6ae8add1ec8422c88ce7d4009d34043e8f4baf Mon Sep 17 00:00:00 2001 From: Savorboard Date: Tue, 17 Apr 2018 14:50:20 +0800 Subject: [PATCH] update samples. --- CAP.sln | 12 ++++---- .../Controllers/ValuesController.cs | 0 .../Program.cs | 0 .../Sample.Kafka.MySql.csproj | 1 + .../Startup.cs | 12 ++------ .../Properties/launchSettings.json | 29 ------------------- 6 files changed, 9 insertions(+), 45 deletions(-) rename samples/{Sample.Kafka.SqlServer => Sample.Kafka.MySql}/Controllers/ValuesController.cs (100%) rename samples/{Sample.Kafka.SqlServer => Sample.Kafka.MySql}/Program.cs (100%) rename samples/{Sample.Kafka.SqlServer => Sample.Kafka.MySql}/Sample.Kafka.MySql.csproj (93%) rename samples/{Sample.Kafka.SqlServer => Sample.Kafka.MySql}/Startup.cs (60%) delete mode 100644 samples/Sample.Kafka.SqlServer/Properties/launchSettings.json diff --git a/CAP.sln b/CAP.sln index 174a366..952416d 100644 --- a/CAP.sln +++ b/CAP.sln @@ -58,7 +58,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.PostgreSql", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.PostgreSql.Test", "test\DotNetCore.CAP.PostgreSql.Test\DotNetCore.CAP.PostgreSql.Test.csproj", "{7CA3625D-1817-4695-881D-7E79A1E1DED2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.MySql", "samples\Sample.Kafka.SqlServer\Sample.Kafka.MySql.csproj", "{573B4D39-5489-48B3-9B6C-5234249CB980}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.MySql", "samples\Sample.Kafka.MySql\Sample.Kafka.MySql.csproj", "{9CB51105-A85B-42A4-AFDE-A4FC34D9EA91}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -109,10 +109,10 @@ Global {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.Build.0 = Release|Any CPU - {573B4D39-5489-48B3-9B6C-5234249CB980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {573B4D39-5489-48B3-9B6C-5234249CB980}.Debug|Any CPU.Build.0 = Debug|Any CPU - {573B4D39-5489-48B3-9B6C-5234249CB980}.Release|Any CPU.ActiveCfg = Release|Any CPU - {573B4D39-5489-48B3-9B6C-5234249CB980}.Release|Any CPU.Build.0 = Release|Any CPU + {9CB51105-A85B-42A4-AFDE-A4FC34D9EA91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CB51105-A85B-42A4-AFDE-A4FC34D9EA91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CB51105-A85B-42A4-AFDE-A4FC34D9EA91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CB51105-A85B-42A4-AFDE-A4FC34D9EA91}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -129,7 +129,7 @@ Global {9F3F9BFE-7B6A-4A7A-A6E6-8B517D611873} = {3A6B6931-A123-477A-9469-8B468B5385AF} {82C403AB-ED68-4084-9A1D-11334F9F08F9} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} {7CA3625D-1817-4695-881D-7E79A1E1DED2} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0} - {573B4D39-5489-48B3-9B6C-5234249CB980} = {3A6B6931-A123-477A-9469-8B468B5385AF} + {9CB51105-A85B-42A4-AFDE-A4FC34D9EA91} = {3A6B6931-A123-477A-9469-8B468B5385AF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2E70565D-94CF-40B4-BFE1-AC18D5F736AB} diff --git a/samples/Sample.Kafka.SqlServer/Controllers/ValuesController.cs b/samples/Sample.Kafka.MySql/Controllers/ValuesController.cs similarity index 100% rename from samples/Sample.Kafka.SqlServer/Controllers/ValuesController.cs rename to samples/Sample.Kafka.MySql/Controllers/ValuesController.cs diff --git a/samples/Sample.Kafka.SqlServer/Program.cs b/samples/Sample.Kafka.MySql/Program.cs similarity index 100% rename from samples/Sample.Kafka.SqlServer/Program.cs rename to samples/Sample.Kafka.MySql/Program.cs diff --git a/samples/Sample.Kafka.SqlServer/Sample.Kafka.MySql.csproj b/samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj similarity index 93% rename from samples/Sample.Kafka.SqlServer/Sample.Kafka.MySql.csproj rename to samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj index 1c5a152..ad812ae 100644 --- a/samples/Sample.Kafka.SqlServer/Sample.Kafka.MySql.csproj +++ b/samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/Sample.Kafka.SqlServer/Startup.cs b/samples/Sample.Kafka.MySql/Startup.cs similarity index 60% rename from samples/Sample.Kafka.SqlServer/Startup.cs rename to samples/Sample.Kafka.MySql/Startup.cs index cdea862..419e48e 100644 --- a/samples/Sample.Kafka.SqlServer/Startup.cs +++ b/samples/Sample.Kafka.MySql/Startup.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Builder; +using System; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Sample.Kafka.MySql @@ -12,15 +13,6 @@ namespace Sample.Kafka.MySql x.UseMySql("Server=192.168.10.110;Database=testcap;UserId=root;Password=123123;"); x.UseKafka("192.168.10.110:9092"); x.UseDashboard(); - - //x.UseDiscovery(d => - //{ - // d.DiscoveryServerHostName = "localhost"; - // d.DiscoveryServerPort = 8500; - // d.CurrentNodeHostName = "localhost"; - // d.CurrentNodePort = 5820; - // d.NodeName = "CAP 2号节点"; - //}); }); services.AddMvc(); diff --git a/samples/Sample.Kafka.SqlServer/Properties/launchSettings.json b/samples/Sample.Kafka.SqlServer/Properties/launchSettings.json deleted file mode 100644 index 60815cf..0000000 --- a/samples/Sample.Kafka.SqlServer/Properties/launchSettings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:57172/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "cap", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Sample.Kafka.SqlServer": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "cap", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:57174/" - } - } -} \ No newline at end of file