diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-26 18:25:52 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-26 18:25:52 +0200 |
| commit | afb6bbb2123932b3562e1af993eb847d8147bf58 (patch) | |
| tree | a2c458a077551af5be35a729c4e6d976a92b9387 /Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI | |
| parent | 61f2658295193dca0fdaa58744925d90bd2f4044 (diff) | |
| download | Tango-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.cs | 14 |
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 { |
