1 // ------------------------------------------------------------------------------
2 // <copyright file="CodeDirectiveCollection.cs" company="Microsoft">
4 // <OWNER>Microsoft</OWNER>
5 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // ------------------------------------------------------------------------------
9 namespace System.CodeDom {
11 using System.Collections;
12 using System.Runtime.InteropServices;
16 ClassInterface(ClassInterfaceType.AutoDispatch),
20 public class CodeDirectiveCollection : CollectionBase {
22 public CodeDirectiveCollection() {
25 public CodeDirectiveCollection(CodeDirectiveCollection value) {
29 public CodeDirectiveCollection(CodeDirective[] value) {
33 public CodeDirective this[int index] {
35 return ((CodeDirective)(List[index]));
42 public int Add(CodeDirective value) {
43 return List.Add(value);
46 public void AddRange(CodeDirective[] value) {
48 throw new ArgumentNullException("value");
50 for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
55 public void AddRange(CodeDirectiveCollection value) {
57 throw new ArgumentNullException("value");
59 int currentCount = value.Count;
60 for (int i = 0; i < currentCount; i = ((i) + (1))) {
65 public bool Contains(CodeDirective value) {
66 return List.Contains(value);
69 public void CopyTo(CodeDirective[] array, int index) {
70 List.CopyTo(array, index);
73 public int IndexOf(CodeDirective value) {
74 return List.IndexOf(value);
77 public void Insert(int index, CodeDirective value) {
78 List.Insert(index, value);
81 public void Remove(CodeDirective value) {