Interfaces.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Microsoft.Cci.Pdb {
  4. /// <summary>
  5. /// A range of CLR IL operations that comprise a lexical scope, specified as an IL offset and a length.
  6. /// </summary>
  7. interface ILocalScope {
  8. /// <summary>
  9. /// The offset of the first operation in the scope.
  10. /// </summary>
  11. uint Offset { get; }
  12. /// <summary>
  13. /// The length of the scope. Offset+Length equals the offset of the first operation outside the scope, or equals the method body length.
  14. /// </summary>
  15. uint Length { get; }
  16. }
  17. /// <summary>
  18. /// A description of the lexical scope in which a namespace type has been nested. This scope is tied to a particular
  19. /// method body, so that partial types can be accommodated.
  20. /// </summary>
  21. interface INamespaceScope {
  22. /// <summary>
  23. /// Zero or more used namespaces. These correspond to using clauses in C#.
  24. /// </summary>
  25. IEnumerable<IUsedNamespace> UsedNamespaces { get; }
  26. }
  27. /// <summary>
  28. /// A namespace that is used (imported) inside a namespace scope.
  29. /// </summary>
  30. interface IUsedNamespace {
  31. /// <summary>
  32. /// An alias for a namespace. For example the "x" of "using x = y.z;" in C#. Empty if no alias is present.
  33. /// </summary>
  34. IName Alias { get; }
  35. /// <summary>
  36. /// The name of a namepace that has been aliased. For example the "y.z" of "using x = y.z;" or "using y.z" in C#.
  37. /// </summary>
  38. IName NamespaceName { get; }
  39. }
  40. /// <summary>
  41. /// The name of an entity. Typically name instances come from a common pool. Within the pool no two distinct instances will have the same Value or UniqueKey.
  42. /// </summary>
  43. interface IName {
  44. /// <summary>
  45. /// An integer that is unique within the pool from which the name instance has been allocated. Useful as a hashtable key.
  46. /// </summary>
  47. int UniqueKey {
  48. get;
  49. //^ ensures result > 0;
  50. }
  51. /// <summary>
  52. /// An integer that is unique within the pool from which the name instance has been allocated. Useful as a hashtable key.
  53. /// All name instances in the pool that have the same string value when ignoring the case of the characters in the string
  54. /// will have the same key value.
  55. /// </summary>
  56. int UniqueKeyIgnoringCase {
  57. get;
  58. //^ ensures result > 0;
  59. }
  60. /// <summary>
  61. /// The string value corresponding to this name.
  62. /// </summary>
  63. string Value { get; }
  64. }
  65. }