当前位置: 首页>>代码示例>>C#>>正文


C# ModelApplicationBase.AddLayerBeforeLast方法代码示例

本文整理汇总了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;
        }
开发者ID:gvilas,项目名称:eXpand,代码行数:14,代码来源:XpoModelDictionaryDifferenceStore.cs

示例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;
        }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:19,代码来源:ModelDifferenceObject.cs

示例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;
 }
开发者ID:kamchung322,项目名称:eXpand,代码行数:10,代码来源:XpoModelDictionaryDifferenceStore.cs

示例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);
 }
开发者ID:kamchung322,项目名称:eXpand,代码行数:12,代码来源:XpoModelDictionaryDifferenceStore.cs

示例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;
 }
开发者ID:paulute,项目名称:eXpand,代码行数:16,代码来源:XpoModelDictionaryDifferenceStore.cs


注:本文中的ModelApplicationBase.AddLayerBeforeLast方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。