CodeArrayIndexerExpression.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // System.CodeDom CodeArrayIndexerExpression Class implementation
  3. //
  4. // Author:
  5. // Daniel Stodden ([email protected])
  6. //
  7. // (C) 2002 Ximian, Inc.
  8. //
  9. using System.Runtime.InteropServices;
  10. namespace System.CodeDom {
  11. [Serializable]
  12. [ClassInterface(ClassInterfaceType.AutoDispatch)]
  13. [ComVisible(true)]
  14. public class CodeArrayIndexerExpression
  15. : CodeExpression
  16. {
  17. private CodeExpressionCollection indices;
  18. private CodeExpression targetObject;
  19. //
  20. // Constructors
  21. //
  22. public CodeArrayIndexerExpression()
  23. {
  24. }
  25. public CodeArrayIndexerExpression( CodeExpression targetObject, params CodeExpression[] indices )
  26. {
  27. this.targetObject = targetObject;
  28. this.Indices.AddRange( indices );
  29. }
  30. //
  31. // Properties
  32. //
  33. public CodeExpressionCollection Indices {
  34. get {
  35. if ( indices == null )
  36. indices = new CodeExpressionCollection();
  37. return indices;
  38. }
  39. }
  40. public CodeExpression TargetObject {
  41. get {
  42. return targetObject;
  43. }
  44. set {
  45. targetObject = value;
  46. }
  47. }
  48. }
  49. }