コード例 #1
0
        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)
                {
                }
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public override void Save(XmlSettingCategory aCategory)
 {
     aCategory[KSettingsKeyFileName] = base.FSEntity.FullName;
 }
コード例 #6
0
        public override DbgEntity Create(XmlSettingCategory aSettingsCategory)
        {
            MissingEntity ret = MissingEntity.New(this, aSettingsCategory);

            return(ret);
        }
コード例 #7
0
        public override DbgEntity Create(XmlSettingCategory aSettingsCategory)
        {
            DbgEntity ret = UnsupportedEntity.New(this, aSettingsCategory);

            return(ret);
        }
コード例 #8
0
 public abstract DbgEntity Create(XmlSettingCategory aSettingsCategory);
コード例 #9
0
ファイル: DbgEntity.cs プロジェクト: fedor4ever/CrashAnalyser
 public virtual void Load(XmlSettingCategory aCategory)
 {
 }
コード例 #10
0
ファイル: DbgEntity.cs プロジェクト: fedor4ever/CrashAnalyser
 public virtual void Save(XmlSettingCategory aCategory)
 {
 }