diff --git a/tUtils/SupportedTypes.cs b/tUtils/SupportedTypes.cs new file mode 100644 index 0000000000000000000000000000000000000000..76c3403e048ea3ad94a166c7d223aaa26128ab2c --- /dev/null +++ b/tUtils/SupportedTypes.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using System.Linq; + +namespace tUtils +{ + + public class SupportedTypes + { + private static HashSet<string> allowedTypes = new HashSet<string> + { + "Byte", "Boolean", + "Int32", "UInt32", "Int16", "UInt16", "Int64", "UInt64", + "Single", "Double", "Decimal", + "Char", "String", "DateTime" + }; + + + /// <summary> + /// Translates 3rd party type name to supported type name + /// </summary> + /// <param name="type">3rd party type name</param> + /// <returns>Supported type name or null</returns> + public static string Translate(string type) => allowedTypes.FirstOrDefault(at => at.ToLower().Contains(type.ToLower())); + } +} diff --git a/tUtils/Utils.cs b/tUtils/Utils.cs index f4c824e211a596607aad900040a2d7d21142daa0..55c7b5c4db370298061de3c4abc503de951d65eb 100644 --- a/tUtils/Utils.cs +++ b/tUtils/Utils.cs @@ -10,4 +10,4 @@ namespace tUtils return (long)span.TotalMilliseconds; } } -} +} \ No newline at end of file diff --git a/tUtils/tUtils.csproj b/tUtils/tUtils.csproj index f208d303c9811fa05807ef8f72685b8ebb536a37..5c19c79ad0f2ce442f1533da5a7da16c09afd041 100644 --- a/tUtils/tUtils.csproj +++ b/tUtils/tUtils.csproj @@ -2,6 +2,21 @@ <PropertyGroup> <TargetFramework>net5.0</TargetFramework> + <AssemblyVersion>2021.6.22.2</AssemblyVersion> + <FileVersion>2021.6.22.2</FileVersion> + <Version>2021.6.0</Version> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <ShouldCreateLogs>True</ShouldCreateLogs> + <AdvancedSettingsExpanded>False</AdvancedSettingsExpanded> + <UpdateAssemblyVersion>False</UpdateAssemblyVersion> + <UpdateAssemblyFileVersion>False</UpdateAssemblyFileVersion> + <UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion> + <UpdatePackageVersion>True</UpdatePackageVersion> + <PackageVersionSettings>AssemblyVersion.IncrementWithAutoReset.None</PackageVersionSettings> + <AssemblyInfoVersionType>SettingsVersion</AssemblyInfoVersionType> + <InheritWinAppVersionFrom>None</InheritWinAppVersionFrom> </PropertyGroup> </Project>