first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
namespace RobotNet.MapShares.Property;
#nullable disable
public class ElementProperty
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string DefaultValue { get; set; }
public bool ReadOnly { get; set; }
private static readonly Dictionary<string, Type> TypeMap = new()
{
{ "Boolean", typeof(bool) },
{ "Double", typeof(double) },
{ "Int", typeof(int) },
{ "String", typeof(string) },
{ "System.Boolean", typeof(bool) },
{ "System.Double", typeof(double) },
{ "System.Int", typeof(int) },
{ "System.String", typeof(string) },
};
public static string GetPropertyTypeName(Type type)
{
return TypeMap.FirstOrDefault(kv => kv.Value == type).Key ?? "Unknown";
}
public static readonly Type[] PropertyTypes = [
typeof(bool),
typeof(double),
typeof(int),
typeof(string),
];
public Type GetPropertyType()
{
return TypeMap.TryGetValue(Type ?? string.Empty, out var type) ? type : typeof(object);
}
}