public SymInfoEnumerator(SymReader reader) { // This version enumerates over all of the data blocks. this.reader = reader; this.token = 0; this.start = 0; if (reader != null) { this.num = reader.numIndexEntries; } else { this.num = 0; } this.index = -1; }
internal SymMethod(SymReader reader, int token) { this.reader = reader; this.token = token; }
internal SymDocument(SymReader reader, String language, String url) { this.reader = reader; this.language = language; this.url = url; }
// Get a reader for the the file public ISymbolReader GetReader( int importer, string filename, string searchPath) { IntPtr Reader; // Demand the permission to access unmanaged code. We do this since we are casting an int to a COM interface, and // this can be used improperly. (new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)).Demand(); int hr; COMException Exception; hr = SymBinder_GetReaderForFile(m_Binder, importer, filename, searchPath, out Reader); if (hr < 0) { Exception = new COMException("Call to GetReaderForFile failed.", hr); throw Exception; } SymReader SymbolReader = new SymReader(Reader); return SymbolReader; }
public SymInfoEnumerator(SymReader reader, int token) { // Save the reader and token information for later. this.reader = reader; this.token = token; this.index = -1; if (reader == null || reader.data == null) { // There is no symbol information to be processed. this.start = 0; this.num = 0; return; } // Locate the token information in the symbol data. int left = 0; int right = reader.numIndexEntries - 1; int middle, temp; while (left <= right) { middle = left + (right - left) / 2; temp = Utils.ReadInt32 (reader.data, reader.indexOffset + middle * 8); if (((uint)temp) < ((uint)token)) { left = middle + 1; } else if (((uint)temp) > ((uint)token)) { right = middle - 1; } else { // We've found an entry: search forwards and // backwards to find the extent of the token. left = middle; while (left > 0) { temp = Utils.ReadInt32 (reader.data, reader.indexOffset + (left - 1) * 8); if (temp == token) { --left; } else { break; } } right = middle; while (right < (reader.numIndexEntries - 1)) { temp = Utils.ReadInt32 (reader.data, reader.indexOffset + (right + 1) * 8); if (temp == token) { ++right; } else { break; } } this.start = left; this.num = right - left + 1; return; } } // We were unable to find the token data. this.start = 0; this.num = 0; }
// Constructors. public SymInfoEnumerator(SymReader reader, String name) : this(reader, Utils.CreatePseudoToken(name)) { }
public SymInfoEnumerator(SymReader reader, int token) { // Save the reader and token information for later. this.reader = reader; this.token = token; this.index = -1; if(reader == null || reader.data == null) { // There is no symbol information to be processed. this.start = 0; this.num = 0; return; } // Locate the token information in the symbol data. int left = 0; int right = reader.numIndexEntries - 1; int middle, temp; while(left <= right) { middle = left + (right - left) / 2; temp = Utils.ReadInt32 (reader.data, reader.indexOffset + middle * 8); if(((uint)temp) < ((uint)token)) { left = middle + 1; } else if(((uint)temp) > ((uint)token)) { right = middle - 1; } else { // We've found an entry: search forwards and // backwards to find the extent of the token. left = middle; while(left > 0) { temp = Utils.ReadInt32 (reader.data, reader.indexOffset + (left - 1) * 8); if(temp == token) { --left; } else { break; } } right = middle; while(right < (reader.numIndexEntries - 1)) { temp = Utils.ReadInt32 (reader.data, reader.indexOffset + (right + 1) * 8); if(temp == token) { ++right; } else { break; } } this.start = left; this.num = right - left + 1; return; } } // We were unable to find the token data. this.start = 0; this.num = 0; }
// Constructors. public SymInfoEnumerator(SymReader reader, String name) : this(reader, Utils.CreatePseudoToken(name)) {}
public SymInfoEnumerator(SymReader reader) { // This version enumerates over all of the data blocks. this.reader = reader; this.token = 0; this.start = 0; if(reader != null) { this.num = reader.numIndexEntries; } else { this.num = 0; } this.index = -1; }