Initial commit from MyParking project

This commit is contained in:
2026-08-04 10:29:21 +08:00
commit d9432bd529
138 changed files with 16957 additions and 0 deletions
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace CommonUsage.Protocols.VDA5050
{
public class CommunicationProtocolFactory
{
public static IVDACommunicationProtocol CreateProtocol(string protocolType, string host, int port)
{
return protocolType.ToLower() switch
{
"http" => new HTTPCommunication(host, port),
"mqtt" => new MQTTCommunication(host, port),
_ => throw new NotSupportedException($"Protocol {protocolType} is not supported")
};
}
}
}