Esempio n. 1
0
        Dictionary <string, ModelDifferenceObjectInfo> CreateNew(ModelApplicationBase model)
        {
            var modelDifferenceObjectInfos = new Dictionary <string, ModelDifferenceObjectInfo>();
            var application = model.CreatorInstance.CreateModelApplication();

            application.Id = Application.Title;
            model.AddLayerBeforeLast(application);
            var modelDifferenceObject     = ObjectSpace.CreateObject <ModelDifferenceObject>().InitializeMembers(application.Id, Application);
            var modelDifferenceObjectInfo = new ModelDifferenceObjectInfo(modelDifferenceObject, application);

            modelDifferenceObjectInfos.Add(application.Id, modelDifferenceObjectInfo);
            return(modelDifferenceObjectInfos);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        Dictionary <string, ModelDifferenceObjectInfo> CreateNew(ModelApplicationBase model, DeviceCategory deviceCategory)
        {
            if (((IModelOptionsModelDifference)model.Application.Options).ModelUpdateMode == ModelUpdateMode.Never)
            {
                throw new NotSupportedException($"You cannot create a new application model while {nameof(IModelOptionsModelDifference.ModelUpdateMode)}={ModelUpdateMode.Never}");
            }
            var modelDifferenceObjectInfos = new Dictionary <string, ModelDifferenceObjectInfo>();
            var application = CreateModelApplication(model, DifferenceType, deviceCategory);

            model.AddLayerBeforeLast(application);
            var modelDifferenceObject = ObjectSpace.CreateObject <ModelDifferenceObject>().InitializeMembers(Application.Title, Application, deviceCategory);

            modelDifferenceObject.CreateAspectsFromPath(Application.GetDiffDefaultName(PathHelper.GetApplicationFolder()));
            CreateUserModelDifferenceXPObjectType();
            var modelDifferenceObjectInfo = new ModelDifferenceObjectInfo(modelDifferenceObject, application);

            modelDifferenceObjectInfos.Add(application.Id, modelDifferenceObjectInfo);
            return(modelDifferenceObjectInfos);
        }
 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;
 }
 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;
 }