Inheritance: IDisposable
Esempio n. 1
0
        public SourceBuffer FindFile(string name)
        {
            if (files.Contains (name))
                return (SourceBuffer) ((ObjectCache) files [name]).Data;

            ObjectCache cache = (ObjectCache) files [name];
            if (cache == null) {
                cache = new ObjectCache (new ObjectCacheFunc (read_file), name, 10);
                files.Add (name, cache);
            }

            return (SourceBuffer) cache.Data;
        }
Esempio n. 2
0
        ArrayList ensure_methods()
        {
            lock (this) {
                if (method_table == null)
                    method_table = new ObjectCache
                        (new ObjectCacheFunc (get_methods), null, 1);

                return (ArrayList) method_table.Data;
            }
        }
Esempio n. 3
0
            internal Section(Bfd bfd, IntPtr section)
            {
                this.bfd = bfd;
                this.section = section;

                this.name = bfd_glue_get_section_name (section);
                this.vma = bfd_glue_get_section_vma (section);
                this.size = bfd_glue_get_section_size (section);
                this.flags = bfd_glue_get_section_flags (section);

                contents = new ObjectCache (
                    new ObjectCacheFunc (get_section_contents), section, 5);
            }