public void ReadSymbolStore(SymbolStore store) { if (Encoding.ASCII.GetString(m_binaryReader.ReadBytes(16)) != store.Signature) { throw new FormatException("Invalid file signature"); } m_store = store; store.Version = new Guid(m_binaryReader.ReadBytes(16)); m_entryPointToken = Int(); m_methodCount = Int(); m_scopes = new Scope [Int()]; m_variableCount = Int(); m_usingCount = Int(); m_constantCount = Int(); m_documents = new Document [Int()]; m_sequencePoints = new SequencePoint [Int()]; int miscHeapSize = Int(); int stringHeapSize = Int(); m_tablesPointer = m_binaryReader.BaseStream.Position; int constantPointer = (int)m_tablesPointer; int methodPointer = constantPointer + m_constantCount * 40; int scopePointer = methodPointer + m_methodCount * 52; int variablePointer = scopePointer + m_scopes.Length * 20; int usingPointer = variablePointer + m_variableCount * 56; int spPointer = usingPointer + m_usingCount * 8; int docPointer = spPointer + m_sequencePoints.Length * 24; m_miscHeapPointer = docPointer + m_documents.Length * 84; m_stringHeapPointer = m_miscHeapPointer + miscHeapSize; int size = (int)m_stringHeapPointer + stringHeapSize; if (size != m_binaryReader.BaseStream.Length) { throw new FormatException("Non valid file"); } Pos((int)m_stringHeapPointer); ReadStrings(); Pos(scopePointer); ReadScopes(); Pos(variablePointer); ReadVariables(); Pos(usingPointer); ReadUsings(); Pos(constantPointer); ReadConstants(); Pos(docPointer); ReadDocuments(); Pos(spPointer); ReadSequencePoints(); Pos(methodPointer); ReadMethods(); }
public static SymbolStore GetSymbolStore (Stream stream) { SymbolStoreReader reader = new SymbolStoreReader (new BinaryReader (stream)); SymbolStore ss = new SymbolStore (); reader.ReadSymbolStore (ss); return ss; }
public static SymbolStore GetSymbolStore(Stream stream) { SymbolStoreReader reader = new SymbolStoreReader(new BinaryReader(stream)); SymbolStore ss = new SymbolStore(); reader.ReadSymbolStore(ss); return(ss); }
public static void SaveSymbolStore (SymbolStore store, Stream stream) { throw new NotImplementedException (); }
public static void SaveSymbolStore (SymbolStore store, out byte [] symbolstore) { throw new NotImplementedException (); }
public static void SaveSymbolStore (SymbolStore store, string file) { throw new NotImplementedException (); }
public virtual void VisitSymbolStore (SymbolStore store) { }
public virtual void TerminateSymbolStore (SymbolStore store) { }
public MethodCollection (SymbolStore container) { m_container = container; m_items = new ArrayList (); }
public static void SaveSymbolStore(SymbolStore store, Stream stream) { throw new NotImplementedException(); }
public static void SaveSymbolStore(SymbolStore store, out byte [] symbolstore) { throw new NotImplementedException(); }
public static void SaveSymbolStore(SymbolStore store, string file) { throw new NotImplementedException(); }
public MethodCollection(SymbolStore container) { m_container = container; m_items = new ArrayList(); }
public void ReadSymbolStore (SymbolStore store) { if (Encoding.ASCII.GetString (m_binaryReader.ReadBytes (16)) != store.Signature) throw new FormatException ("Invalid file signature"); m_store = store; store.Version = new Guid (m_binaryReader.ReadBytes (16)); m_entryPointToken = Int (); m_methodCount = Int (); m_scopes = new Scope [Int ()]; m_variableCount = Int (); m_usingCount = Int (); m_constantCount = Int (); m_documents = new Document [Int ()]; m_sequencePoints = new SequencePoint [Int ()]; int miscHeapSize = Int (); int stringHeapSize = Int (); m_tablesPointer = m_binaryReader.BaseStream.Position; int constantPointer = (int) m_tablesPointer; int methodPointer = constantPointer + m_constantCount * 40; int scopePointer = methodPointer + m_methodCount * 52; int variablePointer = scopePointer + m_scopes.Length * 20; int usingPointer = variablePointer + m_variableCount * 56; int spPointer = usingPointer + m_usingCount * 8; int docPointer = spPointer + m_sequencePoints.Length * 24; m_miscHeapPointer = docPointer + m_documents.Length * 84; m_stringHeapPointer = m_miscHeapPointer + miscHeapSize; int size = (int) m_stringHeapPointer + stringHeapSize; if (size != m_binaryReader.BaseStream.Length) throw new FormatException ("Non valid file"); Pos ((int) m_stringHeapPointer); ReadStrings (); Pos (scopePointer); ReadScopes (); Pos (variablePointer); ReadVariables (); Pos (usingPointer); ReadUsings (); Pos (constantPointer); ReadConstants (); Pos (docPointer); ReadDocuments (); Pos (spPointer); ReadSequencePoints (); Pos (methodPointer); ReadMethods (); }