CodeIndexerExpression.cs 1.0 KB

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