// Public methods
        public void SaveChanges(FeatureModel model)
        {
            // Get the DataEntity
            XmlDAL.DataEntities.FeatureModel dataEntity = Mapper.Map<XmlDAL.DataEntities.FeatureModel>(model);

            // Save it
            new XmlDAL.XMLDataEntityManager(this.modelFolderPath).SaveChanges(dataEntity);
        }
        // Public methods
        public ConfigurationInstance CreateConfigurationInstance(FeatureModel featureModel)
        {
            // Create the ConfigurationInstance from the FeatureModel
            ConfigurationInstance configInstance = new ConfigurationInstance(featureModel);

            // Create its RootFeature

            return configInstance;
        }
 public FeatureModel SaveChanges(FeatureModel featureModel)
 {
     FeatureModelManager manager = new FeatureModelManager(modelFolderPath);
     manager.SaveChanges(featureModel);
     return null;
 }
Exemple #4
0
 // Special static methods
 internal static FeatureModel CreateDefault()
 {
     FeatureModel newBLO = new FeatureModel()
     {
         Name = "Unnamed Model",
         UIOrientation = UIOrientationTypes.Vertical,
         ScaleModifier = 1
     };
     return newBLO;
 }
Exemple #5
0
        public ConfigurationInstance(FeatureModel model)
        {
            this.FeatureModelName = model.Name;

            // Get the root feature
            Feature rootFeature = model.Features.Where(f => !model.Relations.Exists(r => r.ChildFeature == f) &&
                !model.GroupRelations.Exists(gr => gr.ChildFeatures.Contains(f))).SingleOrDefault();

            // root feature = feature which is not the child in any relations or any grouprelations
        }