本文整理汇总了C#中ModelApplicationBase.AddLayerBeforeLast方法的典型用法代码示例。如果您正苦于以下问题:C# ModelApplicationBase.AddLayerBeforeLast方法的具体用法?C# ModelApplicationBase.AddLayerBeforeLast怎么用?C# ModelApplicationBase.AddLayerBeforeLast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelApplicationBase
的用法示例。
在下文中一共展示了ModelApplicationBase.AddLayerBeforeLast方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLoadedModelDifferenceObjectInfos
Dictionary<string, ModelDifferenceObjectInfo> GetLoadedModelDifferenceObjectInfos(ModelApplicationBase model) {
Dictionary<string, ModelDifferenceObjectInfo> loadedModelDifferenceObjectInfos = GetLoadedModelApplications(model);
if (loadedModelDifferenceObjectInfos.Count() == 0) {
var modelDifferenceObjectInfos = new Dictionary<string, ModelDifferenceObjectInfo>();
var application = model.CreatorInstance.CreateModelApplication();
application.Id = XpandModuleBase.Application.Title;
model.AddLayerBeforeLast(application);
var modelDifferenceObject = ObjectSpace.CreateObject<ModelDifferenceObject>().InitializeMembers(application.Id);
modelDifferenceObjectInfos.Add(application.Id, new ModelDifferenceObjectInfo(modelDifferenceObject, application));
loadedModelDifferenceObjectInfos = modelDifferenceObjectInfos;
}
return loadedModelDifferenceObjectInfos;
}
示例2: GetModel
public ModelApplicationBase GetModel(ModelApplicationBase master) {
if (!master.IsMaster) {
throw new ArgumentException("IsNotMaster", "master");
}
if (master.LastLayer.Id != "After Setup")
throw new ArgumentException("master.LastLayer", master.LastLayer.Id);
Guard.ArgumentNotNull(Name, "Name");
var layer = master.CreatorInstance.CreateModelApplication();
layer.Id = Name;
master.AddLayerBeforeLast(layer);
var modelXmlReader = new ModelXmlReader();
foreach (var aspectObject in AspectObjects) {
if (!(string.IsNullOrEmpty(aspectObject.Xml)))
modelXmlReader.ReadFromString(layer, GetAspectName(aspectObject), aspectObject.Xml);
}
_currentModel = layer;
return layer;
}
示例3: CreateNew
Dictionary<string, ModelDifferenceObjectInfo> CreateNew(ModelApplicationBase model) {
var modelDifferenceObjectInfos = new Dictionary<string, ModelDifferenceObjectInfo>();
var application = CreateModelApplication(model, DifferenceType);
model.AddLayerBeforeLast(application);
var modelDifferenceObject = ObjectSpace.CreateObject<ModelDifferenceObject>().InitializeMembers(application.Id, Application);
CreateUserModelDifferenceXPObjectType();
var modelDifferenceObjectInfo = new ModelDifferenceObjectInfo(modelDifferenceObject, application);
modelDifferenceObjectInfos.Add(application.Id, modelDifferenceObjectInfo);
return modelDifferenceObjectInfos;
}
示例4: CreateResourceRoleModels
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);
}
示例5: CreateNew
Dictionary<string, ModelDifferenceObjectInfo> CreateNew(ModelApplicationBase model) {
var modelDifferenceObjectInfos = new Dictionary<string, ModelDifferenceObjectInfo>();
var application = CreateModelApplication(model, DifferenceType);
model.AddLayerBeforeLast(application);
var modelDifferenceObject = ObjectSpace.CreateObject<ModelDifferenceObject>().InitializeMembers(application.Id, Application);
if (Application is ServerApplication) {
var xpObjectType = ObjectSpace.CreateObject<XPObjectType>();
xpObjectType.TypeName = typeof(UserModelDifferenceObject).FullName;
xpObjectType.AssemblyName = typeof(UserModelDifferenceObject).Assembly.GetName().Name;
}
var modelDifferenceObjectInfo = new ModelDifferenceObjectInfo(modelDifferenceObject, application);
modelDifferenceObjectInfos.Add(application.Id, modelDifferenceObjectInfo);
return modelDifferenceObjectInfos;
}