aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-25 16:58:42 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-25 16:58:42 +0200
commitd530d39d7ed9b05e3e233adc62dceba2fd17e1fe (patch)
tree2e042288fdeedd12e3ca0ee331743ebc115eb4b2 /Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs
parentadaddad79352c156303e9178a6f172a18af50cd2 (diff)
downloadTango-d530d39d7ed9b05e3e233adc62dceba2fd17e1fe.tar.gz
Tango-d530d39d7ed9b05e3e233adc62dceba2fd17e1fe.zip
Improved extension methods support on procedures.
Drastically reduces procedure designer loading time. DataStore proto support fully working and tested.
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs')
-rw-r--r--Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs35
1 files changed, 5 insertions, 30 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs b/Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs
index 3cf24bdd0..96a905120 100644
--- a/Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs
+++ b/Software/Visual_Studio/Tango.DataStore/DataStoreHelper.cs
@@ -35,7 +35,11 @@ namespace Tango.DataStore
/// <exception cref="System.NotSupportedException"></exception>
public static DataType GetDataType(Type type)
{
- if (type == typeof(Int32))
+ if (type == typeof(int))
+ {
+ return DataType.Int32;
+ }
+ else if (type == typeof(Int64))
{
return DataType.Int32;
}
@@ -72,35 +76,6 @@ namespace Tango.DataStore
}
/// <summary>
- /// Gets the CLR type by specified data store data type.
- /// </summary>
- /// <param name="type">The type.</param>
- /// <returns></returns>
- /// <exception cref="System.NotSupportedException">The specified data type is not supported.</exception>
- //public static Type GetType(DataType type)
- //{
- // switch (type)
- // {
- // case DataType.Boolean:
- // return typeof(bool);
- // case DataType.Bytes:
- // return typeof(byte[]);
- // case DataType.Double:
- // return typeof(double);
- // case DataType.Float:
- // return typeof(float);
- // case DataType.Int32:
- // return typeof(Int32);
- // case DataType.String:
- // return typeof(String);
- // case DataType.Proto:
- // return typeof(DataStoreProtoObject);
- // }
-
- // throw new NotSupportedException("The specified data type is not supported.");
- //}
-
- /// <summary>
/// Formats the data store item as a string.
/// </summary>
/// <param name="item">The item.</param>