Beispiel #1
0
        void CreateResourceModels(ModelApplicationBase model, Dictionary <string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos)
        {
            var resourcesLayerBuilder = new ResourcesLayerBuilder(ObjectSpace, Application, this);

            resourcesLayerBuilder.AddLayers(ModelApplicationPrefix, loadedModelDifferenceObjectInfos, model);
            CreateResourceRoleModels(resourcesLayerBuilder, loadedModelDifferenceObjectInfos, model);
        }
Beispiel #2
0
        void CreateResourceRoleModels(ResourcesLayerBuilder resourcesLayerBuilder, Dictionary <string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos, ModelApplicationBase model)
        {
            var roleMarker = CreateModelApplication(model, DifferenceType.Role, DeviceCategory.All);

            roleMarker.Id = "RoleMarker";
            model.AddLayerBeforeLast(roleMarker);
            resourcesLayerBuilder.AddLayers(RoleApplicationPrefix, loadedModelDifferenceObjectInfos, model);
            var lastLayer = model.LastLayer;

            while (model.LastLayer.Id != "RoleMarker")
            {
                ModelApplicationHelper.RemoveLayer(model);
            }
            ModelApplicationHelper.RemoveLayer(model);
            ModelApplicationHelper.AddLayer(model, lastLayer);
        }
 void CreateResourceRoleModels(ResourcesLayerBuilder resourcesLayerBuilder, Dictionary<string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos, ModelApplicationBase model) {
     var roleMarker = CreateModelApplication(model,DifferenceType.Role);
     roleMarker.Id = "RoleMarker";
     model.AddLayerBeforeLast(roleMarker);
     resourcesLayerBuilder.AddLayers(RoleApplicationPrefix, loadedModelDifferenceObjectInfos, model);
     var lastLayer = model.LastLayer;
     while (model.LastLayer.Id != "RoleMarker") {
         ModelApplicationHelper.RemoveLayer(model);
     }
     ModelApplicationHelper.RemoveLayer(model);
     ModelApplicationHelper.AddLayer(model, lastLayer);
 }
 void CreateResourceModels(ModelApplicationBase model, Dictionary<string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos) {
     var resourcesLayerBuilder = new ResourcesLayerBuilder(ObjectSpace, Application, this);
     resourcesLayerBuilder.AddLayers(ModelApplicationPrefix, loadedModelDifferenceObjectInfos, model);
     CreateResourceRoleModels(resourcesLayerBuilder, loadedModelDifferenceObjectInfos, model);
 }