本文整理汇总了C#中ModelApplicationBase.RemoveLayer方法的典型用法代码示例。如果您正苦于以下问题:C# ModelApplicationBase.RemoveLayer方法的具体用法?C# ModelApplicationBase.RemoveLayer怎么用?C# ModelApplicationBase.RemoveLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelApplicationBase
的用法示例。
在下文中一共展示了ModelApplicationBase.RemoveLayer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveLayers
IEnumerable<ModelApplicationBase> RemoveLayers(ModelApplicationBase modelApplicationBase, IEnumerable<string> strings) {
var modelApplicationBases = new List<ModelApplicationBase>();
while (modelApplicationBase.LastLayer.Id != "Unchanged Master Part") {
if (!(strings.Contains(modelApplicationBase.LastLayer.Id)))
modelApplicationBases.Add(modelApplicationBase.LastLayer);
modelApplicationBase.RemoveLayer(modelApplicationBase.LastLayer);
}
return modelApplicationBases;
}
示例2: RefreshLayers
static void RefreshLayers(ModelApplicationBase application, Func<ModelApplicationBase, ModelApplicationBase> func) {
var modelApplicationBases = new List<ModelApplicationBase>();
var lastLayer = application.LastLayer;
application.RemoveLayer(lastLayer);
var afterSetup = application.LastLayer;
application.RemoveLayer(afterSetup);
while (application.LastLayer.Id != "Unchanged Master Part") {
ModelApplicationBase modelApplicationBase = application.LastLayer;
modelApplicationBase = func.Invoke(modelApplicationBase);
if (modelApplicationBase!=null)
modelApplicationBases.Add(modelApplicationBase);
application.RemoveLayer(application.LastLayer);
}
modelApplicationBases.Reverse();
foreach (var modelApplicationBase in modelApplicationBases) {
application.AddLayer(modelApplicationBase);
}
application.AddLayer(afterSetup);
application.AddLayer(lastLayer);
}
示例3: GetModelUnSafe
void GetModelUnSafe(ModelApplicationBase modelApplicationBase, ModelDifferenceObject modelDifferenceObject) {
var afterSetupLayer = GetAfterSetupLayer(modelApplicationBase);
modelApplicationBase.AddLayer(afterSetupLayer);
modelDifferenceObject.GetModel(modelApplicationBase);
modelApplicationBase.RemoveLayer(afterSetupLayer);
}
示例4: CreateAspects
public void CreateAspects(ModelApplicationBase model, ModelApplicationBase master) {
var applicationBase = GetModel(master);
new ModelXmlReader().ReadFromModel(applicationBase, model);
CreateAspectsCore(model);
//TODO:check this
if (applicationBase != null) master.RemoveLayer(applicationBase);
}
示例5: CreateResourceRoleModels
void CreateResourceRoleModels(ResourcesLayerBuilder resourcesLayerBuilder, Dictionary<string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos, ModelApplicationBase model) {
var roleMarker = model.CreatorInstance.CreateModelApplication();
roleMarker.Id = "RoleMarker";
model.AddLayerBeforeLast(roleMarker);
resourcesLayerBuilder.AddLayers(RoleApplicationPrefix, loadedModelDifferenceObjectInfos, model);
var lastLayer = model.LastLayer;
while (model.LastLayer.Id!="RoleMarker") {
model.RemoveLayer(model.LastLayer);
}
model.RemoveLayer(roleMarker);
model.AddLayer(lastLayer);
}