diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-08 17:48:58 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-08 17:48:58 +0300 |
| commit | a0e25846735104f09a18647220db59804977e73a (patch) | |
| tree | 63d918543e6862329dd08d4e6db3524ecc199390 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging | |
| parent | 17a77c30765fe8a0d3ca57a9ec60fb43b82432d2 (diff) | |
| download | Tango-a0e25846735104f09a18647220db59804977e73a.tar.gz Tango-a0e25846735104f09a18647220db59804977e73a.zip | |
Fixed issue with
"Application Started" event.
Fixed issue with segment indexing after emb import.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index 91aa049e9..f3ae1002b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -78,21 +78,28 @@ namespace Tango.MachineStudio.Common.EventLogging { if (!_isInitialized) { - _db = ObservablesContext.CreateDefault(); - _db.Configuration.LazyLoadingEnabled = false; + try + { + _db = ObservablesContext.CreateDefault(); + _db.Configuration.LazyLoadingEnabled = false; - _db.ActionTypes.ToList(); - _db.EventTypesActions.ToList(); - _db.EventTypesCategories.ToList(); - _db.EventTypesGroups.ToList(); - _db.EventTypes.ToList(); + _db.ActionTypes.ToList(); + _db.EventTypesActions.ToList(); + _db.EventTypesCategories.ToList(); + _db.EventTypesGroups.ToList(); + _db.EventTypes.ToList(); - foreach (var type in _db.EventTypes) + foreach (var type in _db.EventTypes) + { + _eventTypesGuids.Add((EventTypes)type.Code, type); + } + + _isInitialized = true; + } + catch { - _eventTypesGuids.Add((EventTypes)type.Code, type); + _isInitialized = false; } - - _isInitialized = true; } } |
