diff --git a/.vscode/launch.json b/.vscode/launch.json
index 56d7e06..2fd71c6 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,26 +1,26 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
- "name": ".NET Core Launch (console)",
- "type": "coreclr",
- "request": "launch",
- "preLaunchTask": "build",
- // If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/Async_Await/bin/Debug/net8.0/Async_Await.dll",
- "args": [],
- "cwd": "${workspaceFolder}/Async_Await",
- // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
- "console": "internalConsole",
- "stopAtEntry": false
- },
- {
- "name": ".NET Core Attach",
- "type": "coreclr",
- "request": "attach"
- }
- ]
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/Async_Await/bin/Debug/net8.0/Async_Await.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Async_Await",
+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach"
+ }
+ ]
}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 637fb8b..3202ecf 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,41 +1,41 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "build",
- "command": "dotnet",
- "type": "process",
- "args": [
- "build",
- "${workspaceFolder}/CSharpProjekt.sln",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary;ForceNoAlign"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "publish",
- "command": "dotnet",
- "type": "process",
- "args": [
- "publish",
- "${workspaceFolder}/CSharpProjekt.sln",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary;ForceNoAlign"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "watch",
- "command": "dotnet",
- "type": "process",
- "args": [
- "watch",
- "run",
- "--project",
- "${workspaceFolder}/CSharpProjekt.sln"
- ],
- "problemMatcher": "$msCompile"
- }
- ]
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/CSharpProjekt.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary;ForceNoAlign"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/CSharpProjekt.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary;ForceNoAlign"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/CSharpProjekt.sln"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
}
\ No newline at end of file
diff --git a/Async_Await/obj/Async_Await.csproj.nuget.dgspec.json b/Async_Await/obj/Async_Await.csproj.nuget.dgspec.json
index 765b80f..fcb4047 100644
--- a/Async_Await/obj/Async_Await.csproj.nuget.dgspec.json
+++ b/Async_Await/obj/Async_Await.csproj.nuget.dgspec.json
@@ -1,66 +1,66 @@
-{
- "format": 1,
- "restore": {
- "/workspaces/CSharp/Async_Await/Async_Await.csproj": {}
- },
- "projects": {
- "/workspaces/CSharp/Async_Await/Async_Await.csproj": {
- "version": "1.0.0",
- "restore": {
- "projectUniqueName": "/workspaces/CSharp/Async_Await/Async_Await.csproj",
- "projectName": "Async_Await",
- "projectPath": "/workspaces/CSharp/Async_Await/Async_Await.csproj",
- "packagesPath": "/root/.nuget/packages/",
- "outputPath": "/workspaces/CSharp/Async_Await/obj/",
- "projectStyle": "PackageReference",
- "configFilePaths": [
- "/root/.nuget/NuGet/NuGet.Config"
- ],
- "originalTargetFrameworks": [
- "net8.0"
- ],
- "sources": {
- "https://api.nuget.org/v3/index.json": {}
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "projectReferences": {}
- }
- },
- "warningProperties": {
- "warnAsError": [
- "NU1605"
- ]
- },
- "restoreAuditProperties": {
- "enableAudit": "true",
- "auditLevel": "low",
- "auditMode": "direct"
- }
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.410/PortableRuntimeIdentifierGraph.json"
- }
- }
- }
- }
+{
+ "format": 1,
+ "restore": {
+ "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj": {}
+ },
+ "projects": {
+ "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj",
+ "projectName": "Async_Await",
+ "projectPath": "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj",
+ "packagesPath": "/root/.nuget/packages/",
+ "outputPath": "/workspaces/CSharpProjekt/Async_Await/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/root/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.411/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfo.cs b/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfo.cs
index 2000133..bd1a522 100644
--- a/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfo.cs
+++ b/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Async_Await")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9d9bacd718b457b1e622e2000d7baf963457a871")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4da955ac721d824c4df4ad42acf0ae911ae167d1")]
[assembly: System.Reflection.AssemblyProductAttribute("Async_Await")]
[assembly: System.Reflection.AssemblyTitleAttribute("Async_Await")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfoInputs.cache b/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfoInputs.cache
index 2c0a7fd..9f4ad83 100644
--- a/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfoInputs.cache
+++ b/Async_Await/obj/Debug/net8.0/Async_Await.AssemblyInfoInputs.cache
@@ -1 +1 @@
-715df55e00865760b049b6999c3a198f53ad831234a2f70656b0a5d26a34b8f5
+98ce089cd7e71c6006d86b916e9ec71a58ea1eeca75009d9cab046ac25ea77c5
diff --git a/Async_Await/obj/project.assets.json b/Async_Await/obj/project.assets.json
index 6654458..aabb35b 100644
--- a/Async_Await/obj/project.assets.json
+++ b/Async_Await/obj/project.assets.json
@@ -1,71 +1,71 @@
-{
- "version": 3,
- "targets": {
- "net8.0": {}
- },
- "libraries": {},
- "projectFileDependencyGroups": {
- "net8.0": []
- },
- "packageFolders": {
- "/root/.nuget/packages/": {}
- },
- "project": {
- "version": "1.0.0",
- "restore": {
- "projectUniqueName": "/workspaces/CSharp/Async_Await/Async_Await.csproj",
- "projectName": "Async_Await",
- "projectPath": "/workspaces/CSharp/Async_Await/Async_Await.csproj",
- "packagesPath": "/root/.nuget/packages/",
- "outputPath": "/workspaces/CSharp/Async_Await/obj/",
- "projectStyle": "PackageReference",
- "configFilePaths": [
- "/root/.nuget/NuGet/NuGet.Config"
- ],
- "originalTargetFrameworks": [
- "net8.0"
- ],
- "sources": {
- "https://api.nuget.org/v3/index.json": {}
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "projectReferences": {}
- }
- },
- "warningProperties": {
- "warnAsError": [
- "NU1605"
- ]
- },
- "restoreAuditProperties": {
- "enableAudit": "true",
- "auditLevel": "low",
- "auditMode": "direct"
- }
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.410/PortableRuntimeIdentifierGraph.json"
- }
- }
- }
+{
+ "version": 3,
+ "targets": {
+ "net8.0": {}
+ },
+ "libraries": {},
+ "projectFileDependencyGroups": {
+ "net8.0": []
+ },
+ "packageFolders": {
+ "/root/.nuget/packages/": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj",
+ "projectName": "Async_Await",
+ "projectPath": "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj",
+ "packagesPath": "/root/.nuget/packages/",
+ "outputPath": "/workspaces/CSharpProjekt/Async_Await/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/root/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.411/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/Async_Await/obj/project.nuget.cache b/Async_Await/obj/project.nuget.cache
index 52eb32c..4f1eede 100644
--- a/Async_Await/obj/project.nuget.cache
+++ b/Async_Await/obj/project.nuget.cache
@@ -1,8 +1,8 @@
-{
- "version": 2,
- "dgSpecHash": "WpEPBuOGmH8=",
- "success": true,
- "projectFilePath": "/workspaces/CSharp/Async_Await/Async_Await.csproj",
- "expectedPackageFiles": [],
- "logs": []
+{
+ "version": 2,
+ "dgSpecHash": "aGThoJrW9e4=",
+ "success": true,
+ "projectFilePath": "/workspaces/CSharpProjekt/Async_Await/Async_Await.csproj",
+ "expectedPackageFiles": [],
+ "logs": []
}
\ No newline at end of file
diff --git a/Solution/BeispielTasks.csproj b/Solution/BeispielTasks.csproj
new file mode 100644
index 0000000..46997a0
--- /dev/null
+++ b/Solution/BeispielTasks.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/Solution/mqtt_task_pr3_solution.cs b/Solution/mqtt_task_pr3_solution.cs
new file mode 100644
index 0000000..66b143b
--- /dev/null
+++ b/Solution/mqtt_task_pr3_solution.cs
@@ -0,0 +1,152 @@
+// See https://aka.ms/new-console-template for more information
+using MQTTnet;
+using MQTTnet.Client;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace MqttSensorApp
+{
+ // LÖSUNG Aufgabe 3: SensorData-Klasse implementieren
+ public class SensorData
+ {
+ [JsonPropertyName("temperature")]
+ public double Temperature { get; set; }
+
+ [JsonPropertyName("humidity")]
+ public double Humidity { get; set; }
+
+ [JsonPropertyName("location")]
+ public string Location { get; set; } = string.Empty;
+ }
+
+ public class Program
+ {
+ private static List receivedTemperatures = new List();
+
+ public static async Task Main(string[] args)
+ {
+ Console.WriteLine("MQTT Sensor Data Processor gestartet...");
+
+ // MQTT Client Setup (bereits implementiert)
+ var factory = new MqttFactory();
+ var client = factory.CreateMqttClient();
+
+ // Event Handler für empfangene Nachrichten
+ client.ApplicationMessageReceivedAsync += async e =>
+ {
+ var payload = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
+ await ProcessMessage(payload);
+ };
+
+ // Verbindungsoptionen
+ var options = new MqttClientOptionsBuilder()
+ .WithTcpServer("broker.hivemq.com", 1883)
+ .WithClientId($"SensorClient_{Guid.NewGuid()}")
+ .WithCleanSession()
+ .Build();
+
+ try
+ {
+ // Verbindung aufbauen
+ await client.ConnectAsync(options);
+ Console.WriteLine("Mit MQTT Broker verbunden");
+
+ // Topic abonnieren
+ await client.SubscribeAsync("sensor/data/room1");
+ Console.WriteLine("Topic 'sensor/data/room1' abonniert");
+
+ // Simulierte Sensordaten senden (für Testing)
+ await SendTestData(client);
+
+ // Programm laufen lassen
+ Console.WriteLine("Drücken Sie eine Taste zum Beenden...");
+ Console.ReadKey();
+
+ // Verbindung trennen
+ await client.DisconnectAsync();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Fehler: {ex.Message}");
+ }
+ }
+
+ private static async Task ProcessMessage(string jsonPayload)
+ {
+ try
+ {
+ Console.WriteLine($"Empfangen: {jsonPayload}");
+
+ // LÖSUNG Aufgabe 3: Deserialisieren des JSON zu SensorData
+ var sensorData = JsonSerializer.Deserialize(jsonPayload);
+
+ if (sensorData != null)
+ {
+ receivedTemperatures.Add(sensorData.Temperature);
+
+ // LÖSUNG Aufgabe 2: Pattern Matching anwenden
+ var analysis = AnalyzeMessage(sensorData.Temperature);
+ Console.WriteLine($"Analyse: {analysis}");
+ }
+
+ // Alle 5 Nachrichten: Hohe Temperaturen anzeigen
+ if (receivedTemperatures.Count % 5 == 0)
+ {
+ var highTemps = FilterHighTemperatures(receivedTemperatures);
+ Console.WriteLine($"Hohe Temperaturen (>25°C): {string.Join(", ", highTemps.Select(t => $"{t:F1}°C"))}");
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Fehler beim Verarbeiten der Nachricht: {ex.Message}");
+ }
+ }
+
+ // LÖSUNG Aufgabe 1: LINQ-Abfrage implementieren
+ private static IEnumerable FilterHighTemperatures(List temperatures)
+ {
+ // LINQ Where-Klausel verwenden, um Temperaturen > 25°C zu filtern
+ return temperatures.Where(temp => temp > 25.0);
+ }
+
+ // LÖSUNG Aufgabe 2: Pattern Matching implementieren
+ private static string AnalyzeMessage(object value)
+ {
+ // Switch expression mit Pattern Matching
+ return value switch
+ {
+ double temp when temp > 30.0 => "WARNUNG: Sehr hohe Temperatur!",
+ double temp when temp >= 25.0 && temp <= 30.0 => "Hohe Temperatur",
+ double temp when temp < 25.0 => "Normale Temperatur",
+ string text => "Text-Nachricht erhalten",
+ null => "Keine Daten",
+ _ => "Unbekannter Datentyp"
+ };
+ }
+
+ // Hilfsmethode: Testnachrichten senden
+ private static async Task SendTestData(IMqttClient client)
+ {
+ var testData = new[]
+ {
+ new { temperature = 22.5, humidity = 65.0, location = "Room1" },
+ new { temperature = 28.3, humidity = 58.2, location = "Room1" },
+ new { temperature = 19.8, humidity = 72.1, location = "Room1" },
+ new { temperature = 31.2, humidity = 45.3, location = "Room1" },
+ new { temperature = 26.7, humidity = 62.8, location = "Room1" }
+ };
+
+ foreach (var data in testData)
+ {
+ var json = JsonSerializer.Serialize(data);
+ var message = new MqttApplicationMessageBuilder()
+ .WithTopic("sensor/data/room1")
+ .WithPayload(json)
+ .Build();
+
+ await client.PublishAsync(message);
+ await Task.Delay(2000); // 2 Sekunden Pause
+ }
+ }
+ }
+}
diff --git a/Solution/obj/BeispielTasks.csproj.nuget.dgspec.json b/Solution/obj/BeispielTasks.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..b7ed360
--- /dev/null
+++ b/Solution/obj/BeispielTasks.csproj.nuget.dgspec.json
@@ -0,0 +1,76 @@
+{
+ "format": 1,
+ "restore": {
+ "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj": {}
+ },
+ "projects": {
+ "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj",
+ "projectName": "BeispielTasks",
+ "projectPath": "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj",
+ "packagesPath": "/root/.nuget/packages/",
+ "outputPath": "/workspaces/CSharpProjekt/Solution/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/root/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "dependencies": {
+ "MQTTnet": {
+ "target": "Package",
+ "version": "[4.1.4, )"
+ },
+ "System.Text.Json": {
+ "target": "Package",
+ "version": "[9.0.6, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.411/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Solution/obj/BeispielTasks.csproj.nuget.g.props b/Solution/obj/BeispielTasks.csproj.nuget.g.props
new file mode 100644
index 0000000..112d2bb
--- /dev/null
+++ b/Solution/obj/BeispielTasks.csproj.nuget.g.props
@@ -0,0 +1,15 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ /root/.nuget/packages/
+ /root/.nuget/packages/
+ PackageReference
+ 6.11.1
+
+
+
+
+
\ No newline at end of file
diff --git a/Solution/obj/BeispielTasks.csproj.nuget.g.targets b/Solution/obj/BeispielTasks.csproj.nuget.g.targets
new file mode 100644
index 0000000..28e42c0
--- /dev/null
+++ b/Solution/obj/BeispielTasks.csproj.nuget.g.targets
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Solution/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/Solution/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs
new file mode 100644
index 0000000..dca70aa
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
diff --git a/Solution/obj/Debug/net8.0/Beispiel.98D83876.Up2Date b/Solution/obj/Debug/net8.0/Beispiel.98D83876.Up2Date
new file mode 100644
index 0000000..e69de29
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfo.cs b/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfo.cs
new file mode 100644
index 0000000..448f7db
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfo.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("BeispielTasks")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4da955ac721d824c4df4ad42acf0ae911ae167d1")]
+[assembly: System.Reflection.AssemblyProductAttribute("BeispielTasks")]
+[assembly: System.Reflection.AssemblyTitleAttribute("BeispielTasks")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfoInputs.cache b/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..8acd6b8
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+620d207c41d80e36530c3c7988f0445044b33e4be22ae5f8eed29fa6c84257b0
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.GeneratedMSBuildEditorConfig.editorconfig b/Solution/obj/Debug/net8.0/BeispielTasks.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..12ff8aa
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,13 @@
+is_global = true
+build_property.TargetFramework = net8.0
+build_property.TargetPlatformMinVersion =
+build_property.UsingMicrosoftNETSdkWeb =
+build_property.ProjectTypeGuids =
+build_property.InvariantGlobalization =
+build_property.PlatformNeutralAssembly =
+build_property.EnforceExtendedAnalyzerRules =
+build_property._SupportedPlatformList = Linux,macOS,Windows
+build_property.RootNamespace = BeispielTasks
+build_property.ProjectDir = /workspaces/CSharpProjekt/Solution/
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.GlobalUsings.g.cs b/Solution/obj/Debug/net8.0/BeispielTasks.GlobalUsings.g.cs
new file mode 100644
index 0000000..8578f3d
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.GlobalUsings.g.cs
@@ -0,0 +1,8 @@
+//
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.IO;
+global using global::System.Linq;
+global using global::System.Net.Http;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.assets.cache b/Solution/obj/Debug/net8.0/BeispielTasks.assets.cache
new file mode 100644
index 0000000..16077de
Binary files /dev/null and b/Solution/obj/Debug/net8.0/BeispielTasks.assets.cache differ
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.csproj.AssemblyReference.cache b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..1db9718
Binary files /dev/null and b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.AssemblyReference.cache differ
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.csproj.CoreCompileInputs.cache b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000..7733d11
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+b04f23883cc95a305a38b87f5e338daa9d9a70aa391889b1c3b47713a68c2033
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.csproj.FileListAbsolute.txt b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..6e55a91
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.csproj.FileListAbsolute.txt
@@ -0,0 +1,42 @@
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/BeispielTasks
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/BeispielTasks.deps.json
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/BeispielTasks.runtimeconfig.json
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/BeispielTasks.dll
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/BeispielTasks.pdb
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.GeneratedMSBuildEditorConfig.editorconfig
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.AssemblyInfoInputs.cache
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.AssemblyInfo.cs
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.csproj.CoreCompileInputs.cache
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.dll
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/refint/BeispielTasks.dll
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.pdb
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.genruntimeconfig.cache
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/ref/BeispielTasks.dll
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/BeispielTasks.csproj.AssemblyReference.cache
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/MQTTnet.dll
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/System.IO.Pipelines.dll
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/System.Text.Encodings.Web.dll
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/System.Text.Json.dll
+/workspaces/CSharpProjekt/BeispielTasks/bin/Debug/net8.0/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll
+/workspaces/CSharpProjekt/BeispielTasks/obj/Debug/net8.0/Beispiel.98D83876.Up2Date
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/BeispielTasks
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/BeispielTasks.deps.json
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/BeispielTasks.runtimeconfig.json
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/BeispielTasks.dll
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/BeispielTasks.pdb
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/MQTTnet.dll
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/System.IO.Pipelines.dll
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/System.Text.Encodings.Web.dll
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/System.Text.Json.dll
+/workspaces/CSharpProjekt/Solution/bin/Debug/net8.0/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.csproj.AssemblyReference.cache
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.GeneratedMSBuildEditorConfig.editorconfig
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfoInputs.cache
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.AssemblyInfo.cs
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.csproj.CoreCompileInputs.cache
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/Beispiel.98D83876.Up2Date
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.dll
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/refint/BeispielTasks.dll
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.pdb
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/BeispielTasks.genruntimeconfig.cache
+/workspaces/CSharpProjekt/Solution/obj/Debug/net8.0/ref/BeispielTasks.dll
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.dll b/Solution/obj/Debug/net8.0/BeispielTasks.dll
new file mode 100644
index 0000000..c04bf1d
Binary files /dev/null and b/Solution/obj/Debug/net8.0/BeispielTasks.dll differ
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.genruntimeconfig.cache b/Solution/obj/Debug/net8.0/BeispielTasks.genruntimeconfig.cache
new file mode 100644
index 0000000..f53bd7b
--- /dev/null
+++ b/Solution/obj/Debug/net8.0/BeispielTasks.genruntimeconfig.cache
@@ -0,0 +1 @@
+949b3858502c0fd6c698ced674b2ca502e01b36f04519a83e504d0e264619b94
diff --git a/Solution/obj/Debug/net8.0/BeispielTasks.pdb b/Solution/obj/Debug/net8.0/BeispielTasks.pdb
new file mode 100644
index 0000000..a63a60a
Binary files /dev/null and b/Solution/obj/Debug/net8.0/BeispielTasks.pdb differ
diff --git a/Solution/obj/Debug/net8.0/apphost b/Solution/obj/Debug/net8.0/apphost
new file mode 100644
index 0000000..d071b47
Binary files /dev/null and b/Solution/obj/Debug/net8.0/apphost differ
diff --git a/Solution/obj/Debug/net8.0/ref/BeispielTasks.dll b/Solution/obj/Debug/net8.0/ref/BeispielTasks.dll
new file mode 100644
index 0000000..f083bcb
Binary files /dev/null and b/Solution/obj/Debug/net8.0/ref/BeispielTasks.dll differ
diff --git a/Solution/obj/Debug/net8.0/refint/BeispielTasks.dll b/Solution/obj/Debug/net8.0/refint/BeispielTasks.dll
new file mode 100644
index 0000000..f083bcb
Binary files /dev/null and b/Solution/obj/Debug/net8.0/refint/BeispielTasks.dll differ
diff --git a/Solution/obj/project.assets.json b/Solution/obj/project.assets.json
new file mode 100644
index 0000000..80d7788
--- /dev/null
+++ b/Solution/obj/project.assets.json
@@ -0,0 +1,294 @@
+{
+ "version": 3,
+ "targets": {
+ "net8.0": {
+ "MQTTnet/4.1.4.563": {
+ "type": "package",
+ "compile": {
+ "lib/net6.0/MQTTnet.dll": {}
+ },
+ "runtime": {
+ "lib/net6.0/MQTTnet.dll": {}
+ }
+ },
+ "System.IO.Pipelines/9.0.6": {
+ "type": "package",
+ "compile": {
+ "lib/net8.0/System.IO.Pipelines.dll": {}
+ },
+ "runtime": {
+ "lib/net8.0/System.IO.Pipelines.dll": {}
+ },
+ "build": {
+ "buildTransitive/net8.0/_._": {}
+ }
+ },
+ "System.Text.Encodings.Web/9.0.6": {
+ "type": "package",
+ "compile": {
+ "lib/net8.0/System.Text.Encodings.Web.dll": {}
+ },
+ "runtime": {
+ "lib/net8.0/System.Text.Encodings.Web.dll": {}
+ },
+ "build": {
+ "buildTransitive/net8.0/_._": {}
+ },
+ "runtimeTargets": {
+ "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll": {
+ "assetType": "runtime",
+ "rid": "browser"
+ }
+ }
+ },
+ "System.Text.Json/9.0.6": {
+ "type": "package",
+ "dependencies": {
+ "System.IO.Pipelines": "9.0.6",
+ "System.Text.Encodings.Web": "9.0.6"
+ },
+ "compile": {
+ "lib/net8.0/System.Text.Json.dll": {}
+ },
+ "runtime": {
+ "lib/net8.0/System.Text.Json.dll": {}
+ },
+ "build": {
+ "buildTransitive/net8.0/System.Text.Json.targets": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "MQTTnet/4.1.4.563": {
+ "sha512": "gO9segUcKyQJcjV7w7OOdoAIkec7cUN65vEhYutbdWcj4rbtz/oL/RDvQVVbameXc6ChkjKx7/HbO+R8ejAUZQ==",
+ "type": "package",
+ "path": "mqttnet/4.1.4.563",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "lib/net452/MQTTnet.dll",
+ "lib/net461/MQTTnet.dll",
+ "lib/net5.0/MQTTnet.dll",
+ "lib/net6.0/MQTTnet.dll",
+ "lib/netcoreapp3.1/MQTTnet.dll",
+ "lib/netstandard1.3/MQTTnet.dll",
+ "lib/netstandard2.0/MQTTnet.dll",
+ "lib/netstandard2.1/MQTTnet.dll",
+ "lib/uap10.0.10240/MQTTnet.dll",
+ "lib/uap10.0.10240/MQTTnet.pri",
+ "mqttnet.4.1.4.563.nupkg.sha512",
+ "mqttnet.nuspec",
+ "nuget.png"
+ ]
+ },
+ "System.IO.Pipelines/9.0.6": {
+ "sha512": "0nlr0reXrRmkZNKifKqh2DgGhQgfkT7Qa3gQxIn/JI7/y3WDiTz67M+Sq3vFhUqcG8O5zVrpqHvIHeGPGUBsEw==",
+ "type": "package",
+ "path": "system.io.pipelines/9.0.6",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/System.IO.Pipelines.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net8.0/_._",
+ "buildTransitive/netcoreapp2.0/System.IO.Pipelines.targets",
+ "lib/net462/System.IO.Pipelines.dll",
+ "lib/net8.0/System.IO.Pipelines.dll",
+ "lib/net9.0/System.IO.Pipelines.dll",
+ "lib/netstandard2.0/System.IO.Pipelines.dll",
+ "system.io.pipelines.9.0.6.nupkg.sha512",
+ "system.io.pipelines.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "System.Text.Encodings.Web/9.0.6": {
+ "sha512": "uWRgViw2yJAUyGxrzDLCc6fkzE2dZIoXxs8V6YjCujKsJuP0pnpYSlbm2/7tKd0SjBnMtwfDQhLenk3bXonVOA==",
+ "type": "package",
+ "path": "system.text.encodings.web/9.0.6",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/System.Text.Encodings.Web.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net8.0/_._",
+ "buildTransitive/netcoreapp2.0/System.Text.Encodings.Web.targets",
+ "lib/net462/System.Text.Encodings.Web.dll",
+ "lib/net8.0/System.Text.Encodings.Web.dll",
+ "lib/net9.0/System.Text.Encodings.Web.dll",
+ "lib/netstandard2.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.xml",
+ "runtimes/browser/lib/net9.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net9.0/System.Text.Encodings.Web.xml",
+ "system.text.encodings.web.9.0.6.nupkg.sha512",
+ "system.text.encodings.web.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "System.Text.Json/9.0.6": {
+ "sha512": "h+ZtYTyTnTh5Ju6mHCKb3FPGx4ylJZgm9W7Y2psUnkhQRPMOIxX+TCN0ZgaR/+Yea+93XHWAaMzYTar1/EHIPg==",
+ "type": "package",
+ "path": "system.text.json/9.0.6",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn3.11/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn4.0/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn4.4/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "buildTransitive/net461/System.Text.Json.targets",
+ "buildTransitive/net462/System.Text.Json.targets",
+ "buildTransitive/net8.0/System.Text.Json.targets",
+ "buildTransitive/netcoreapp2.0/System.Text.Json.targets",
+ "buildTransitive/netstandard2.0/System.Text.Json.targets",
+ "lib/net462/System.Text.Json.dll",
+ "lib/net8.0/System.Text.Json.dll",
+ "lib/net9.0/System.Text.Json.dll",
+ "lib/netstandard2.0/System.Text.Json.dll",
+ "system.text.json.9.0.6.nupkg.sha512",
+ "system.text.json.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ }
+ },
+ "projectFileDependencyGroups": {
+ "net8.0": [
+ "MQTTnet >= 4.1.4",
+ "System.Text.Json >= 9.0.6"
+ ]
+ },
+ "packageFolders": {
+ "/root/.nuget/packages/": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj",
+ "projectName": "BeispielTasks",
+ "projectPath": "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj",
+ "packagesPath": "/root/.nuget/packages/",
+ "outputPath": "/workspaces/CSharpProjekt/Solution/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/root/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "dependencies": {
+ "MQTTnet": {
+ "target": "Package",
+ "version": "[4.1.4, )"
+ },
+ "System.Text.Json": {
+ "target": "Package",
+ "version": "[9.0.6, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.411/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ },
+ "logs": [
+ {
+ "code": "NU1603",
+ "level": "Warning",
+ "warningLevel": 1,
+ "message": "BeispielTasks depends on MQTTnet (>= 4.1.4) but MQTTnet 4.1.4 was not found. An approximate best match of MQTTnet 4.1.4.563 was resolved.",
+ "libraryId": "MQTTnet",
+ "targetGraphs": [
+ "net8.0"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Solution/obj/project.nuget.cache b/Solution/obj/project.nuget.cache
new file mode 100644
index 0000000..05a2d24
--- /dev/null
+++ b/Solution/obj/project.nuget.cache
@@ -0,0 +1,24 @@
+{
+ "version": 2,
+ "dgSpecHash": "+DKi8TX5UxE=",
+ "success": true,
+ "projectFilePath": "/workspaces/CSharpProjekt/Solution/BeispielTasks.csproj",
+ "expectedPackageFiles": [
+ "/root/.nuget/packages/mqttnet/4.1.4.563/mqttnet.4.1.4.563.nupkg.sha512",
+ "/root/.nuget/packages/system.io.pipelines/9.0.6/system.io.pipelines.9.0.6.nupkg.sha512",
+ "/root/.nuget/packages/system.text.encodings.web/9.0.6/system.text.encodings.web.9.0.6.nupkg.sha512",
+ "/root/.nuget/packages/system.text.json/9.0.6/system.text.json.9.0.6.nupkg.sha512"
+ ],
+ "logs": [
+ {
+ "code": "NU1603",
+ "level": "Warning",
+ "warningLevel": 1,
+ "message": "BeispielTasks depends on MQTTnet (>= 4.1.4) but MQTTnet 4.1.4 was not found. An approximate best match of MQTTnet 4.1.4.563 was resolved.",
+ "libraryId": "MQTTnet",
+ "targetGraphs": [
+ "net8.0"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/mqtt_task_pr3_solution.cs b/mqtt_task_pr3_solution.cs
index b1e9e09..e69de29 100644
--- a/mqtt_task_pr3_solution.cs
+++ b/mqtt_task_pr3_solution.cs
@@ -1,151 +0,0 @@
-using MQTTnet;
-using MQTTnet.Client;
-using System.Text.Json;
-using System.Text.Json.Serialization;
-
-namespace MqttSensorApp
-{
- // LÖSUNG Aufgabe 3: SensorData-Klasse implementieren
- public class SensorData
- {
- [JsonPropertyName("temperature")]
- public double Temperature { get; set; }
-
- [JsonPropertyName("humidity")]
- public double Humidity { get; set; }
-
- [JsonPropertyName("location")]
- public string Location { get; set; } = string.Empty;
- }
-
- public class Program
- {
- private static List receivedTemperatures = new List();
-
- public static async Task Main(string[] args)
- {
- Console.WriteLine("MQTT Sensor Data Processor gestartet...");
-
- // MQTT Client Setup (bereits implementiert)
- var factory = new MqttFactory();
- var client = factory.CreateMqttClient();
-
- // Event Handler für empfangene Nachrichten
- client.ApplicationMessageReceivedAsync += async e =>
- {
- var payload = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
- await ProcessMessage(payload);
- };
-
- // Verbindungsoptionen
- var options = new MqttClientOptionsBuilder()
- .WithTcpServer("broker.hivemq.com", 1883)
- .WithClientId($"SensorClient_{Guid.NewGuid()}")
- .WithCleanSession()
- .Build();
-
- try
- {
- // Verbindung aufbauen
- await client.ConnectAsync(options);
- Console.WriteLine("Mit MQTT Broker verbunden");
-
- // Topic abonnieren
- await client.SubscribeAsync("sensor/data/room1");
- Console.WriteLine("Topic 'sensor/data/room1' abonniert");
-
- // Simulierte Sensordaten senden (für Testing)
- await SendTestData(client);
-
- // Programm laufen lassen
- Console.WriteLine("Drücken Sie eine Taste zum Beenden...");
- Console.ReadKey();
-
- // Verbindung trennen
- await client.DisconnectAsync();
- }
- catch (Exception ex)
- {
- Console.WriteLine($"Fehler: {ex.Message}");
- }
- }
-
- private static async Task ProcessMessage(string jsonPayload)
- {
- try
- {
- Console.WriteLine($"Empfangen: {jsonPayload}");
-
- // LÖSUNG Aufgabe 3: Deserialisieren des JSON zu SensorData
- var sensorData = JsonSerializer.Deserialize(jsonPayload);
-
- if (sensorData != null)
- {
- receivedTemperatures.Add(sensorData.Temperature);
-
- // LÖSUNG Aufgabe 2: Pattern Matching anwenden
- var analysis = AnalyzeMessage(sensorData.Temperature);
- Console.WriteLine($"Analyse: {analysis}");
- }
-
- // Alle 5 Nachrichten: Hohe Temperaturen anzeigen
- if (receivedTemperatures.Count % 5 == 0)
- {
- var highTemps = FilterHighTemperatures(receivedTemperatures);
- Console.WriteLine($"Hohe Temperaturen (>25°C): {string.Join(", ", highTemps.Select(t => $"{t:F1}°C"))}");
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine($"Fehler beim Verarbeiten der Nachricht: {ex.Message}");
- }
- }
-
- // LÖSUNG Aufgabe 1: LINQ-Abfrage implementieren
- private static IEnumerable FilterHighTemperatures(List temperatures)
- {
- // LINQ Where-Klausel verwenden, um Temperaturen > 25°C zu filtern
- return temperatures.Where(temp => temp > 25.0);
- }
-
- // LÖSUNG Aufgabe 2: Pattern Matching implementieren
- private static string AnalyzeMessage(object value)
- {
- // Switch expression mit Pattern Matching
- return value switch
- {
- double temp when temp > 30.0 => "WARNUNG: Sehr hohe Temperatur!",
- double temp when temp >= 25.0 && temp <= 30.0 => "Hohe Temperatur",
- double temp when temp < 25.0 => "Normale Temperatur",
- string text => "Text-Nachricht erhalten",
- null => "Keine Daten",
- _ => "Unbekannter Datentyp"
- };
- }
-
- // Hilfsmethode: Testnachrichten senden
- private static async Task SendTestData(IMqttClient client)
- {
- var testData = new[]
- {
- new { temperature = 22.5, humidity = 65.0, location = "Room1" },
- new { temperature = 28.3, humidity = 58.2, location = "Room1" },
- new { temperature = 19.8, humidity = 72.1, location = "Room1" },
- new { temperature = 31.2, humidity = 45.3, location = "Room1" },
- new { temperature = 26.7, humidity = 62.8, location = "Room1" }
- };
-
- foreach (var data in testData)
- {
- var json = JsonSerializer.Serialize(data);
- var message = new MqttApplicationMessageBuilder()
- .WithTopic("sensor/data/room1")
- .WithPayload(json)
- .Build();
-
- await client.PublishAsync(message);
- await Task.Delay(2000); // 2 Sekunden Pause
- }
- }
- }
-}
\ No newline at end of file