Esempio n. 1
0
 public void InvalidateRichText()
 {
     lock ( _richTextCache )
     {
         _richTextCache.Clear();
     }
 }
Esempio n. 2
0
 private void ClearAllList()
 {
     foreach (IResourceList list in _unreadResourcesToView.Keys)
     {
         DetachFromList(list);
         list.Dispose();
     }
     _unreadResourcesToView.Clear();
     _viewToUnreadResources.Clear();
 }
Esempio n. 3
0
 private void DisposeDataNodes()
 {
     lock ( _dataNodes )
     {
         foreach (IntHashTable.Entry e in _dataNodes)
         {
             ResourceTreeDataNode node = (ResourceTreeDataNode)e.Value;
             node.Dispose();
         }
         _dataNodes.Clear();
     }
 }
Esempio n. 4
0
        private static void CollectExportableFolders(IntArrayList listFeedIds)
        {
            _exportedFolders.Clear();

            //  All feeds?
            if (listFeedIds == null)
            {
                IResourceList allFeeds = Core.ResourceStore.GetAllResources(Props.RSSFeedResource);
                listFeedIds = new IntArrayList(allFeeds.ResourceIds);
            }

            foreach (int id in listFeedIds)
            {
                IResource feed   = Core.ResourceStore.LoadResource(id);
                IResource parent = feed.GetLinkProp(Core.Props.Parent);
                while (parent != null)
                {
                    _exportedFolders[parent.Id] = 1;
                    parent = parent.GetLinkProp(Core.Props.Parent);
                }
            }
        }
Esempio n. 5
0
        static void LoadManagedLines(PdbFunction[] funcs,
                                     IntHashTable names,
                                     BitAccess bits,
                                     uint limit)
        {
            Array.Sort(funcs, PdbFunction.byAddress);
            checks.Clear();

            // Read the files first
            int begin = bits.Position;

            while (bits.Position < limit)
            {
                int sig;
                int siz;
                bits.ReadInt32(out sig);
                bits.ReadInt32(out siz);
                int place  = bits.Position;
                int endSym = bits.Position + siz;

                switch ((DEBUG_S_SUBSECTION)sig)
                {
                case DEBUG_S_SUBSECTION.FILECHKSMS:
                    while (bits.Position < endSym)
                    {
                        CV_FileCheckSum chk;

                        int ni = bits.Position - place;
                        bits.ReadUInt32(out chk.name);
                        bits.ReadUInt8(out chk.len);
                        bits.ReadUInt8(out chk.type);

                        string    name = (string)names[(int)chk.name];
                        PdbSource src  = new PdbSource((uint)ni, name);
                        checks.Add(ni, src);
                        bits.Position += chk.len;
                        bits.Align(4);
                    }
                    bits.Position = endSym;
                    break;

                default:
                    bits.Position = endSym;
                    break;
                }
            }

            // Read the lines next.
            bits.Position = begin;
            while (bits.Position < limit)
            {
                int sig;
                int siz;
                bits.ReadInt32(out sig);
                bits.ReadInt32(out siz);
                int endSym = bits.Position + siz;

                switch ((DEBUG_S_SUBSECTION)sig)
                {
                case DEBUG_S_SUBSECTION.LINES: {
                    CV_LineSection sec;

                    bits.ReadUInt32(out sec.off);
                    bits.ReadUInt16(out sec.sec);
                    bits.ReadUInt16(out sec.flags);
                    bits.ReadUInt32(out sec.cod);
                    PdbFunction func = FindFunction(funcs, sec.sec, sec.off);

                    // Count the line blocks.
                    int begSym = bits.Position;
                    int blocks = 0;
                    while (bits.Position < endSym)
                    {
                        CV_SourceFile file;
                        bits.ReadUInt32(out file.index);
                        bits.ReadUInt32(out file.count);
                        bits.ReadUInt32(out file.linsiz);       // Size of payload.
                        int linsiz = (int)file.count * (8 + ((sec.flags & 1) != 0 ? 4 : 0));
                        bits.Position += linsiz;
                        blocks++;
                    }

                    func.lines = new PdbLines[blocks];
                    int block = 0;

                    bits.Position = begSym;
                    while (bits.Position < endSym)
                    {
                        CV_SourceFile file;
                        bits.ReadUInt32(out file.index);
                        bits.ReadUInt32(out file.count);
                        bits.ReadUInt32(out file.linsiz);       // Size of payload.

                        PdbSource src = (PdbSource)checks[(int)file.index];
                        PdbLines  tmp = new PdbLines(src, file.count);
                        func.lines[block++] = tmp;
                        PdbLine[] lines = tmp.lines;

                        int plin = bits.Position;
                        int pcol = bits.Position + 8 * (int)file.count;

                        for (int i = 0; i < file.count; i++)
                        {
                            CV_Line   line;
                            CV_Column column = new CV_Column();

                            bits.Position = plin + 8 * i;
                            bits.ReadUInt32(out line.offset);
                            bits.ReadUInt32(out line.flags);

                            uint delta     = (line.flags & 0x7f000000) >> 24;
                            bool statement = ((line.flags & 0x80000000) == 0);
                            if ((sec.flags & 1) != 0)
                            {
                                bits.Position = pcol + 4 * i;
                                bits.ReadUInt16(out column.offColumnStart);
                                bits.ReadUInt16(out column.offColumnEnd);
                            }

                            lines[i] = new PdbLine(line.offset,
                                                   line.flags & 0xffffff,
                                                   column.offColumnStart,
                                                   column.offColumnEnd);
                        }
                    }
                    break;
                }
                }
                bits.Position = endSym;
            }
        }