diff --git a/WebApplication2/Controllers/WeatherForecastController.cs b/WebApplication2/Controllers/WeatherForecastController.cs deleted file mode 100644 index 6a0cc85..0000000 --- a/WebApplication2/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace WebApplication2.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} diff --git a/WebApplication2/Program.cs b/WebApplication2/Program.cs deleted file mode 100644 index 7e2b3ea..0000000 --- a/WebApplication2/Program.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace WebApplication2 -{ - public class Program - { - public static void Main(string[] args) - { - var builder = WebApplication.CreateBuilder(args); - - // Add services to the container. - - builder.Services.AddControllers(); - - var app = builder.Build(); - - // Configure the HTTP request pipeline. - - app.UseAuthorization(); - - - app.MapControllers(); - - app.Run(); - } - } -} diff --git a/WebApplication2/Properties/launchSettings.json b/WebApplication2/Properties/launchSettings.json deleted file mode 100644 index 5074619..0000000 --- a/WebApplication2/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:58914", - "sslPort": 0 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "weatherforecast", - "applicationUrl": "http://localhost:5082", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "weatherforecast", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/WebApplication2/WeatherForecast.cs b/WebApplication2/WeatherForecast.cs deleted file mode 100644 index 9380df7..0000000 --- a/WebApplication2/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace WebApplication2 -{ - public class WeatherForecast - { - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} diff --git a/WebApplication2/WebApplication2.csproj b/WebApplication2/WebApplication2.csproj deleted file mode 100644 index 5a4b181..0000000 --- a/WebApplication2/WebApplication2.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - diff --git a/WebApplication2/WebApplication2.http b/WebApplication2/WebApplication2.http deleted file mode 100644 index d6d25b0..0000000 --- a/WebApplication2/WebApplication2.http +++ /dev/null @@ -1,6 +0,0 @@ -@WebApplication2_HostAddress = http://localhost:5082 - -GET {{WebApplication2_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/WebApplication2/appsettings.Development.json b/WebApplication2/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/WebApplication2/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/WebApplication2/appsettings.json b/WebApplication2/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/WebApplication2/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/WebApplication2/services/MQServices.cs b/WebApplication2/services/MQServices.cs deleted file mode 100644 index 995e254..0000000 --- a/WebApplication2/services/MQServices.cs +++ /dev/null @@ -1,51 +0,0 @@ - -using Confluent.Kafka; - -namespace WebApplication2.services -{ - public class MQServices : BackgroundService - { - protected override async Task ExecuteAsync(CancellationToken stoppingToken) - { - var conf = new ConsumerConfig - { - GroupId = "test-consumer-group", - BootstrapServers = "localhost:9092", - // Note: The AutoOffsetReset property determines the start offset in the event - // there are not yet any committed offsets for the consumer group for the - // topic/partitions of interest. By default, offsets are committed - // automatically, so in this example, consumption will only start from the - // earliest message in the topic 'my-topic' the first time you run the program. - AutoOffsetReset = AutoOffsetReset.Earliest - }; - - using (var c = new ConsumerBuilder(conf).Build()) - { - c.Subscribe("test-topic"); - try - { - while (true) - { - try - { - var cr = c.Consume(stoppingToken); - var v= cr.Message.Value; - var k=cr.Message.Key; - Console.WriteLine($"Consumed message '{k} {v}' at: '{cr.TopicPartitionOffset}'."); - } - catch (ConsumeException e) - { - Console.WriteLine($"Error occured: {e.Error.Reason}"); - } - } - } - catch (OperationCanceledException) - { - // Ensure the consumer leaves the group cleanly and final offsets are committed. - c.Close(); - } - } - await Task.CompletedTask; - } - } -} diff --git a/WebServices/.config/dotnet-tools.json b/WebServices/.config/dotnet-tools.json deleted file mode 100644 index ef95326..0000000 --- a/WebServices/.config/dotnet-tools.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "dotnet-ef": { - "version": "9.0.9", - "commands": [ - "dotnet-ef" - ], - "rollForward": false - } - } -} \ No newline at end of file diff --git a/WebServices/Controllers/WeatherForecastController.cs b/WebServices/Controllers/WeatherForecastController.cs deleted file mode 100644 index 2e73217..0000000 --- a/WebServices/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace WebServices.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} diff --git a/WebServices/Program.cs b/WebServices/Program.cs deleted file mode 100644 index 5abba95..0000000 --- a/WebServices/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace WebServices -{ - public class Program - { - public static void Main(string[] args) - { - var builder = WebApplication.CreateBuilder(args); - - // Add services to the container. - - builder.Services.AddWindowsService(); - builder.Services.AddControllers(); - - var app = builder.Build(); - - // Configure the HTTP request pipeline. - - app.UseAuthorization(); - - - app.MapControllers(); - - app.Run(); - } - } -} diff --git a/WebServices/Properties/PublishProfiles/FolderProfile.pubxml b/WebServices/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index 2cd7f3b..0000000 --- a/WebServices/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - false - false - true - Release - Any CPU - FileSystem - bin\Release\net8.0\publish\ - FileSystem - <_TargetId>Folder - - net8.0 - win-x64 - d93b795d-4836-40aa-b14a-d742b4f04f14 - false - - \ No newline at end of file diff --git a/WebServices/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebServices/Properties/PublishProfiles/FolderProfile.pubxml.user deleted file mode 100644 index 6da2820..0000000 --- a/WebServices/Properties/PublishProfiles/FolderProfile.pubxml.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - - <_PublishTargetUrl>E:\tian\BLWLogMonitor\WebServices\bin\Release\net8.0\publish\ - True|2025-10-10T07:48:04.6905094Z||; - - - \ No newline at end of file diff --git a/WebServices/Properties/launchSettings.json b/WebServices/Properties/launchSettings.json deleted file mode 100644 index 7ad5fd3..0000000 --- a/WebServices/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:37392", - "sslPort": 0 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "weatherforecast", - "applicationUrl": "http://localhost:5029", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "weatherforecast", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/WebServices/WeatherForecast.cs b/WebServices/WeatherForecast.cs deleted file mode 100644 index ce7e4e0..0000000 --- a/WebServices/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace WebServices -{ - public class WeatherForecast - { - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} diff --git a/WebServices/WebServices.csproj b/WebServices/WebServices.csproj deleted file mode 100644 index 130a5c8..0000000 --- a/WebServices/WebServices.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - diff --git a/WebServices/WebServices.csproj.user b/WebServices/WebServices.csproj.user deleted file mode 100644 index db6462b..0000000 --- a/WebServices/WebServices.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - E:\tian\BLWLogMonitor\WebServices\Properties\PublishProfiles\FolderProfile.pubxml - - \ No newline at end of file diff --git a/WebServices/WebServices.http b/WebServices/WebServices.http deleted file mode 100644 index 489f26d..0000000 --- a/WebServices/WebServices.http +++ /dev/null @@ -1,6 +0,0 @@ -@WebServices_HostAddress = http://localhost:5029 - -GET {{WebServices_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/WebServices/appsettings.Development.json b/WebServices/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/WebServices/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/WebServices/appsettings.json b/WebServices/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/WebServices/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -}