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

  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:  ISymbolScope
  18. **
  19. **
  20. ** Represents a lexical scope within a ISymbolMethod. Provides access to
  21. ** the start and end offsets of the scope, as well as its child and
  22. ** parent scopes. Also provides access to all the locals defined
  23. ** within this scope.
  24. **
  25. **
  26. ===========================================================*/
  27. namespace System.Diagnostics.SymbolStore
  28. {
  29.     // Interface does not need to be marked with the serializable attribute
  30.     using System;
  31.     using System.Text;
  32.     using System.Runtime.InteropServices;
  33.    
  34.     [System.Runtime.InteropServices.ComVisible(true)]
  35.     public interface ISymbolScope
  36.     {
  37.         // Get the method that contains this scope.
  38.         ISymbolMethod Method {
  39.             get;
  40.         }
  41.        
  42.         // Get the parent scope of this scope.
  43.         ISymbolScope Parent {
  44.             get;
  45.         }
  46.        
  47.         // Get any child scopes of this scope.
  48.         ISymbolScope[] GetChildren();
  49.        
  50.         // Get the start and end offsets for this scope.
  51.         int StartOffset {
  52.             get;
  53.         }
  54.         int EndOffset {
  55.             get;
  56.         }
  57.        
  58.         // Get the locals within this scope. They are returned in no
  59.         // particular order. Note: if a local variable changes its address
  60.         // within this scope then that variable will be returned multiple
  61.         // times, each with a different offset range.
  62.         ISymbolVariable[] GetLocals();
  63.        
  64.         // Get the namespaces that are being "used" within this scope.
  65.         ISymbolNamespace[] GetNamespaces();
  66.     }
  67. }

Developer Fusion