public override void Load(ModelApplicationBase model) { Tracing.Tracer.LogSubSeparator("ModelDifference -- Adding Layers to application model "); var extraDiffStoresLayerBuilder = new ExtraDiffStoresLayerBuilder(); var language = model.Application.PreferredLanguage; var objectInfos = GetObjectInfos(model, DeviceCategory.All); if (DeviceModelsEnabled) { objectInfos = objectInfos.Concat(GetObjectInfos(model, Application.GetDeviceCategory())).ToDictionary(pair => pair.Key, pair => pair.Value); } extraDiffStoresLayerBuilder.AddLayers(objectInfos, _extraDiffStores); Tracing.Tracer.LogSubSeparator("ModelDifference -- Loaded: " + _executed); if (!_executed) { UpdateModelFromPath(model, objectInfos); Tracing.Tracer.LogSubSeparator("ModelDifference -- CreateResourceModels"); CreateResourceModels(model, objectInfos); _executed = true; } if (model.Application.PreferredLanguage != language) { Application.SetLanguage(model.Application.PreferredLanguage); } Tracing.Tracer.LogSubSeparator("ModelDifference -- Layers added to application model"); ObjectSpace.CommitChanges(); Tracing.Tracer.LogSubSeparator("ModelDifference -- Application model saved to the database"); }
public override void Load(ModelApplicationBase model) { Tracing.Tracer.LogVerboseSubSeparator("ModelDifference -- Adding Layers to application model "); var extraDiffStoresLayerBuilder = new ExtraDiffStoresLayerBuilder(); var language = model.Application.PreferredLanguage; if (UseModelFromPath()) { return; } var loadedModelDifferenceObjectInfos = GetLoadedModelDifferenceObjectInfos(model); extraDiffStoresLayerBuilder.AddLayers(loadedModelDifferenceObjectInfos, _extraDiffStores); if (_loadResources) { Tracing.Tracer.LogVerboseSubSeparator("ModelDifference -- CreateResourceModels"); CreateResourceModels(model, loadedModelDifferenceObjectInfos); } if (model.Application.PreferredLanguage != language) { Application.SetLanguage(model.Application.PreferredLanguage); } Tracing.Tracer.LogVerboseSubSeparator("ModelDifference -- Layers added to application model"); ObjectSpace.CommitChanges(); Tracing.Tracer.LogVerboseSubSeparator("ModelDifference -- Application model saved to the database"); }
public override void Load(ModelApplicationBase model) { var extraDiffStoresLayerBuilder = new ExtraDiffStoresLayerBuilder(); var language = model.Application.PreferredLanguage; if (UseModelFromPath()) { return; } var loadedModelDifferenceObjectInfos = GetLoadedModelDifferenceObjectInfos(model); extraDiffStoresLayerBuilder.AddLayers(loadedModelDifferenceObjectInfos, _extraDiffStores); if (_loadResources) CreateResourceModels(model, loadedModelDifferenceObjectInfos); if (model.Application.PreferredLanguage != language) { Application.SetLanguage(model.Application.PreferredLanguage); } ObjectSpace.CommitChanges(); }
public override void Load(ModelApplicationBase model) { var extraDiffStoresLayerBuilder = new ExtraDiffStoresLayerBuilder(); var language = model.Application.PreferredLanguage; if (UseModelFromPath()) { return; } var loadedModelDifferenceObjectInfos = GetLoadedModelDifferenceObjectInfos(model); extraDiffStoresLayerBuilder.AddLayers(loadedModelDifferenceObjectInfos, _extraDiffStores); if (_loadResources) { CreateResourceModels(model, loadedModelDifferenceObjectInfos); } if (model.Application.PreferredLanguage != language) { Application.SetLanguage(model.Application.PreferredLanguage); } ObjectSpace.CommitChanges(); }