diff --git a/CAP.sln b/CAP.sln index 66c3488..0fde2c7 100644 --- a/CAP.sln +++ b/CAP.sln @@ -66,9 +66,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.AzureService EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.InMemoryStorage", "src\DotNetCore.CAP.InMemoryStorage\DotNetCore.CAP.InMemoryStorage.csproj", "{58B6E829-C6C8-457C-9DD0-C600650254DF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.AzureServiceBus.InMemory", "samples\Sample.AzureServiceBus.InMemory\Sample.AzureServiceBus.InMemory.csproj", "{1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.Dashboard", "src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj", "{56FB261C-67AF-4715-9A46-4FA4FAB91B2C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetCore.CAP.Dashboard", "src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj", "{56FB261C-67AF-4715-9A46-4FA4FAB91B2C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.InMemory", "samples\Sample.Kafka.InMemory\Sample.Kafka.InMemory.csproj", "{1B0371D6-36A4-4C78-A727-8ED732FDBA1D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -141,14 +141,14 @@ Global {58B6E829-C6C8-457C-9DD0-C600650254DF}.Debug|Any CPU.Build.0 = Debug|Any CPU {58B6E829-C6C8-457C-9DD0-C600650254DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {58B6E829-C6C8-457C-9DD0-C600650254DF}.Release|Any CPU.Build.0 = Release|Any CPU - {1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8}.Release|Any CPU.Build.0 = Release|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Release|Any CPU.ActiveCfg = Release|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Release|Any CPU.Build.0 = Release|Any CPU + {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -171,8 +171,8 @@ Global {11563D1A-27CC-45CF-8C04-C16BCC21250A} = {3A6B6931-A123-477A-9469-8B468B5385AF} {63B2A464-FBEA-42FB-8EFA-98AFA39FC920} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} {58B6E829-C6C8-457C-9DD0-C600650254DF} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} - {1E1E959C-3D0E-45C3-ABCA-DAAACE68AAB8} = {3A6B6931-A123-477A-9469-8B468B5385AF} {56FB261C-67AF-4715-9A46-4FA4FAB91B2C} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} + {1B0371D6-36A4-4C78-A727-8ED732FDBA1D} = {3A6B6931-A123-477A-9469-8B468B5385AF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2E70565D-94CF-40B4-BFE1-AC18D5F736AB} diff --git a/samples/Sample.AzureServiceBus.InMemory/Program.cs b/samples/Sample.AzureServiceBus.InMemory/Program.cs deleted file mode 100644 index e2a308c..0000000 --- a/samples/Sample.AzureServiceBus.InMemory/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace Sample.AzureServiceBus.InMemory -{ - public class Program - { - - public static void Main(string[] args) - { - BuildWebHost(args).Run(); - } - - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup() - .Build(); - } -} \ No newline at end of file diff --git a/samples/Sample.AzureServiceBus.InMemory/Controllers/ValuesController.cs b/samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs similarity index 93% rename from samples/Sample.AzureServiceBus.InMemory/Controllers/ValuesController.cs rename to samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs index 74f1cdf..b382b41 100644 --- a/samples/Sample.AzureServiceBus.InMemory/Controllers/ValuesController.cs +++ b/samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using DotNetCore.CAP; using Microsoft.AspNetCore.Mvc; -namespace Sample.AzureServiceBus.InMemory.Controllers +namespace Sample.Kafka.InMemory.Controllers { [Route("api/[controller]")] public class ValuesController : Controller, ICapSubscribe diff --git a/samples/Sample.Kafka.InMemory/Program.cs b/samples/Sample.Kafka.InMemory/Program.cs new file mode 100644 index 0000000..b0af402 --- /dev/null +++ b/samples/Sample.Kafka.InMemory/Program.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Sample.Kafka.InMemory +{ + 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(); + }); + } +} \ No newline at end of file diff --git a/samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj b/samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj similarity index 82% rename from samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj rename to samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj index 740cd66..9e5e3aa 100644 --- a/samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj +++ b/samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj @@ -7,9 +7,9 @@ - + diff --git a/samples/Sample.AzureServiceBus.InMemory/Startup.cs b/samples/Sample.Kafka.InMemory/Startup.cs similarity index 75% rename from samples/Sample.AzureServiceBus.InMemory/Startup.cs rename to samples/Sample.Kafka.InMemory/Startup.cs index 75b59f3..281ef24 100644 --- a/samples/Sample.AzureServiceBus.InMemory/Startup.cs +++ b/samples/Sample.Kafka.InMemory/Startup.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; -namespace Sample.AzureServiceBus.InMemory +namespace Sample.Kafka.InMemory { public class Startup { @@ -10,7 +10,7 @@ namespace Sample.AzureServiceBus.InMemory services.AddCap(x => { x.UseInMemoryStorage(); - x.UseAzureServiceBus("Endpoint=sb://testcap.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey="); + x.UseKafka("192.168.2.120:9093"); x.UseDashboard(); }); diff --git a/samples/Sample.AzureServiceBus.InMemory/appsettings.json b/samples/Sample.Kafka.InMemory/appsettings.json similarity index 100% rename from samples/Sample.AzureServiceBus.InMemory/appsettings.json rename to samples/Sample.Kafka.InMemory/appsettings.json