The Labs \ Source Viewer \ SSCLI \ System.Diagnostics.SymbolStore \ ISymbolReader

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Class:  ISymbolReader
  18. **
  19. **
  20. ** Represents a symbol reader for managed code. Provides access to
  21. ** documents, methods, and variables.
  22. **
  23. **
  24. ===========================================================*/
  25. namespace System.Diagnostics.SymbolStore
  26. {
  27.     // Interface does not need to be marked with the serializable attribute
  28.     using System;
  29.     using System.Runtime.InteropServices;
  30.    
  31.    
  32.     [System.Runtime.InteropServices.ComVisible(true)]
  33.     public interface ISymbolReader
  34.     {
  35.         // Find a document. Language, vendor, and document type are
  36.         // optional.
  37.         ISymbolDocument GetDocument(string url, Guid language, Guid languageVendor, Guid documentType);
  38.        
  39.         // Return an array of all of the documents defined in the symbol
  40.         // store.
  41.         ISymbolDocument[] GetDocuments();
  42.        
  43.         // Return the method that was specified as the user entry point
  44.         // for the module, if any. This would be, perhaps, the user's main
  45.         // method rather than compiler generated stubs before main.
  46.         SymbolToken UserEntryPoint {
  47.             get;
  48.         }
  49.        
  50.         // Get a symbol reader method given the id of a method.
  51.         ISymbolMethod GetMethod(SymbolToken method);
  52.        
  53.         // Get a symbol reader method given the id of a method and an E&C
  54.         // version number. Version numbers start a 1 and are incremented
  55.         // each time the method is changed due to an E&C operation.
  56.         ISymbolMethod GetMethod(SymbolToken method, int version);
  57.        
  58.         // Return a non-local variable given its parent and name.
  59.         ISymbolVariable[] GetVariables(SymbolToken parent);
  60.        
  61.         // Return a non-local variable given its parent and name.
  62.         ISymbolVariable[] GetGlobalVariables();
  63.        
  64.         // Given a position in a document, return the ISymbolMethod that
  65.         // contains that position.
  66.         ISymbolMethod GetMethodFromDocumentPosition(ISymbolDocument document, int line, int column);
  67.        
  68.         // Gets a custom attribute based upon its name. Not to be
  69.         // confused with Metadata custom attributes, these attributes are
  70.         // held in the symbol store.
  71.         byte[] GetSymAttribute(SymbolToken parent, string name);
  72.        
  73.         // Get the namespaces defined at global scope within this symbol store.
  74.         ISymbolNamespace[] GetNamespaces();
  75.     }
  76.    
  77. }

Developer Fusion