aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-02-26 18:25:52 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-02-26 18:25:52 +0200
commitafb6bbb2123932b3562e1af993eb847d8147bf58 (patch)
treea2c458a077551af5be35a729c4e6d976a92b9387 /Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI
parent61f2658295193dca0fdaa58744925d90bd2f4044 (diff)
downloadTango-afb6bbb2123932b3562e1af993eb847d8147bf58.tar.gz
Tango-afb6bbb2123932b3562e1af993eb847d8147bf58.zip
Major Changes Regarding RML & SPOOL parameters changes!
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
index ac20feb04..208adf63f 100644
--- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
+++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
@@ -154,6 +154,14 @@ namespace Tango.DBObservablesGenerator.CLI
{
codeField.Type = String.Format("Nullable<{0}>", "DateTime");
}
+ else if (field.PropertyType == typeof(Nullable<Int32>))
+ {
+ codeField.Type = String.Format("Nullable<{0}>", "Int32");
+ }
+ else if (field.PropertyType == typeof(Nullable<Double>))
+ {
+ codeField.Type = String.Format("Nullable<{0}>", "Double");
+ }
else
{
codeField.Type = String.Format("SynchronizedObservableCollection<{0}>", DalNameToStandardName(field.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC());
@@ -237,7 +245,7 @@ namespace Tango.DBObservablesGenerator.CLI
//Generate Enumerations...
using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataSource))
{
- foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType))
+ foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable()))
{
try
{
@@ -387,7 +395,7 @@ namespace Tango.DBObservablesGenerator.CLI
codeField.Description = FirstCharacterToLower(DalNameToStandardName(name));
- if (field.PropertyType.IsGenericType)
+ if (field.PropertyType.IsGenericTypeAndNotNullable())
{
continue;
}
@@ -435,7 +443,7 @@ namespace Tango.DBObservablesGenerator.CLI
//Generate Enumerations...
using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataSource))
{
- foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType))
+ foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable()))
{
try
{