protected override void OnCurrentObjectChanged() {
     _modelLoader = new ModelLoader(CurrentObject.PersistentApplication.ExecutableName);
     InterfaceBuilder.SkipAssemblyCleanup = true;
     _masterModel = _modelLoader.GetMasterModel(false);
     InterfaceBuilder.SkipAssemblyCleanup = false;
     base.OnCurrentObjectChanged();
 }
 void CombineModelFromPermission(ModelApplicationBase model) {
     if (SecuritySystem.Instance is ISecurityComplex && IsGranted()) {
         var space = Application.CreateObjectSpace();
         ModelDifferenceObject difference = GetDifferenceFromPermission((XPObjectSpace)space);
         var master = new ModelLoader(difference.PersistentApplication.ExecutableName).GetMasterModel(true);
         var diffsModel = difference.GetModel(master);
         new ModelXmlReader().ReadFromModel(diffsModel, model);
         difference.CreateAspectsCore(diffsModel);
         space.SetModified(difference);
         space.CommitChanges();
     }
 }
Exemple #3
0
        public override void UpdateDatabaseAfterUpdateSchema() {
            base.UpdateDatabaseAfterUpdateSchema();

            var uniqueName = new ExternalApplicationModelStore().Name;
            if (new QueryModelDifferenceObject(ObjectSpace.Session).GetActiveModelDifference(uniqueName, "ExternalApplication") == null) {
                var modelDifferenceObject = new ModelDifferenceObject(ObjectSpace.Session).InitializeMembers("ExternalApplication", "ExternalApplication", uniqueName);
                modelDifferenceObject.PersistentApplication.ExecutableName = "ExternalApplication.Win.exe";
                var modelApplicationBuilder = new ModelLoader(modelDifferenceObject.PersistentApplication.ExecutableName);
                var model = modelApplicationBuilder.GetLayer(typeof(ExternalApplicationModelStore));
                modelDifferenceObject.CreateAspects(model);
                ObjectSpace.CommitChanges();
            }
        }
 protected override void OnCurrentObjectChanged() {
     _modelLoader = new ModelLoader(CurrentObject.PersistentApplication.ExecutableName);
     _masterModel = _modelLoader.GetMasterModel(true);
     base.OnCurrentObjectChanged();
 }