Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tUtils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Twin
Twinzo
tUtils
Commits
11ce365d
Commit
11ce365d
authored
3 years ago
by
Patrik Paško
Browse files
Options
Downloads
Patches
Plain Diff
- Supported type translation added
parent
6716aea8
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
- Supported type translation added
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tUtils/SupportedTypes.cs
+25
-0
25 additions, 0 deletions
tUtils/SupportedTypes.cs
tUtils/Utils.cs
+1
-1
1 addition, 1 deletion
tUtils/Utils.cs
tUtils/tUtils.csproj
+15
-0
15 additions, 0 deletions
tUtils/tUtils.csproj
with
41 additions
and
1 deletion
tUtils/SupportedTypes.cs
0 → 100644
+
25
−
0
View file @
11ce365d
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
()));
}
}
This diff is collapsed.
Click to expand it.
tUtils/Utils.cs
+
1
−
1
View file @
11ce365d
...
...
@@ -10,4 +10,4 @@ namespace tUtils
return
(
long
)
span
.
TotalMilliseconds
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tUtils/tUtils.csproj
+
15
−
0
View file @
11ce365d
...
...
@@ -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>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment