public void XmlSettingsLoad(XmlSettings aSettings, string aCategory) { Clear(); // int count = aSettings.Load(aCategory, "__Count", 0); for (int i = 0; i < count; i++) { try { // Create category name and try to obtain it... string entityCategory = string.Format("DbgEntity_{0:d5}", i); XmlSettingCategory category = aSettings[entityCategory]; if (category != null) { // Make a new entity object based upon the type DbgEntityDescriptorManager descManager = Engine.DescriptorManager; DbgEntity entity = descManager.Create(category); if (entity != null) { SaveEntity(entity); } } } catch (Exception) { } } }
public static UnsupportedEntity New(DbgEntityDescriptor aDescriptor, XmlSettingCategory aSettingsCategory) { UnsupportedEntity ret = null; // if (aSettingsCategory.Contains(KSettingsKeyFileName)) { string fileName = aSettingsCategory[KSettingsKeyFileName]; ret = New(aDescriptor, FSEntity.New(fileName)); } // return(ret); }
public void XmlSettingsSave(XmlSettings aSettings, string aCategory) { aSettings.Clear(); aSettings[aCategory, "__Count"] = Count; int index = 0; foreach (DbgEntity entity in this) { string entityCategory = string.Format("DbgEntity_{0:d5}", index++); // Get the category where we'll save the settings for this entity to... XmlSettingCategory category = aSettings[entityCategory]; // Save entity specific settings entity.Save(category); } }
internal DbgEntity Create(XmlSettingCategory aSettingsCategory) { DbgEntity ret = null; // foreach (DbgEntityDescriptor descriptor in iDescriptors) { try { ret = descriptor.Create(aSettingsCategory); if (ret != null) { break; } } catch (Exception) { } } // return(ret); }
public override void Save(XmlSettingCategory aCategory) { aCategory[KSettingsKeyFileName] = base.FSEntity.FullName; }
public override DbgEntity Create(XmlSettingCategory aSettingsCategory) { MissingEntity ret = MissingEntity.New(this, aSettingsCategory); return(ret); }
public override DbgEntity Create(XmlSettingCategory aSettingsCategory) { DbgEntity ret = UnsupportedEntity.New(this, aSettingsCategory); return(ret); }
public abstract DbgEntity Create(XmlSettingCategory aSettingsCategory);
public virtual void Load(XmlSettingCategory aCategory) { }
public virtual void Save(XmlSettingCategory aCategory) { }