Exemple #1
0
        public void Remove(DbgEntity aEntity)
        {
            DbgEntityDescriptor descriptor = aEntity.Descriptor;

            if (descriptor != null)
            {
                DbgEntityListCategorised list;
                if (iLists.TryGetValue(descriptor.CategoryName, out list))
                {
                    // Try to find the entity from the list and, if found,
                    // destroy it.
                    using (DbgEntity removed = list.Remove(aEntity))
                    {
                        if (removed != null)
                        {
                            // Tell the entity
                            removed.OnRemoved();

                            // Tell everybody else
                            Engine.OnRemoved(removed);
                        }
                    }
                }
                if (iDisplayOrderList.TryGetValue(descriptor, out list))
                {
                    iDisplayOrderList.Remove(descriptor);
                }
            }
        }
Exemple #2
0
        public static UnsupportedEntity New(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
        {
            UnsupportedEntity ret = null;

            //
            if (aFSEntity.Exists)
            {
                ret = new UnsupportedEntity(aDescriptor, aFSEntity);
            }
            //
            return(ret);
        }
Exemple #3
0
        public static MissingEntity New(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
        {
            MissingEntity ret = null;

            //
            if (aFSEntity.IsFile && !aFSEntity.Exists)
            {
                ret = new MissingEntity(aDescriptor, aFSEntity);
            }
            //
            return(ret);
        }
Exemple #4
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);
        }
        public static SymbolEntity New(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
        {
            SymbolEntity ret = null;

            // Validate that it's a supported file
            if (aFSEntity.Exists && aFSEntity.IsFile)
            {
                string          type         = string.Empty;
                DbgEngine       engine       = aDescriptor.Engine;
                DbgEngineSymbol symbolEngine = engine.Symbols;
                bool            supported    = symbolEngine.IsSupported(aFSEntity.FullName, out type);
                //
                if (supported)
                {
                    ret = new SymbolEntity(aDescriptor, aFSEntity);
                }
            }
            //
            return(ret);
        }
Exemple #6
0
        private void SaveEntity(DbgEntity aEntity)
        {
            // Check if the dictionary already contains an entity descriptor list
            DbgEntityDescriptor      descriptor = aEntity.Descriptor;
            DbgEntityListCategorised list;

            if (!iLists.TryGetValue(descriptor.CategoryName, out list))
            {
                list = new DbgEntityListCategorised(Engine, descriptor);

                // We create two lists. One sorts and indexes by display order, the other indexes by category.
                iLists.Add(descriptor.CategoryName, list);
                if (!iDisplayOrderList.ContainsKey(descriptor))
                {
                    iDisplayOrderList.Add(descriptor, list);
                }
            }

            // Add to list
            list.Add(aEntity);

            // Notify engine
            Engine.OnAdded(aEntity);
        }
Exemple #7
0
 internal DbgEntityListCategorised(DbgEngine aEngine, DbgEntityDescriptor aDescriptor)
     : base(aEngine)
 {
     iDescriptor = aDescriptor;
 }
Exemple #8
0
 private UnsupportedEntity(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
     : base(aDescriptor, aFSEntity)
 {
 }
Exemple #9
0
 private CodeEntity(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
     : base(aDescriptor, aFSEntity)
 {
 }
 private SymbolEntity(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
     : base(aDescriptor, aFSEntity)
 {
 }
Exemple #11
0
 protected DbgEntity(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
 {
     iDescriptor = aDescriptor;
     iEntity     = aFSEntity;
     iResult     = new DbgEntityPrimerResult(this);
 }
Exemple #12
0
 private MissingEntity(DbgEntityDescriptor aDescriptor, FSEntity aFSEntity)
     : base(aDescriptor, aFSEntity)
 {
 }