2 /*****************************************************************************
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 ********************************************************************************/
21 using System
.Collections
;
23 namespace Castle
.MVC
.Controllers
26 /// Description résumée de PairCollection.
28 public class PropertyControllerCollection
: CollectionBase
33 public PropertyControllerCollection() {}
38 /// Accès a un élément de la collection par son index
40 public PropertyController
this[int index
]
42 get { return (PropertyController)List[index]; }
43 set { List[index] = value; }
47 /// Ajoute un(e) Charge
49 public int Add(PropertyController
value)
51 return List
.Add(value);
55 /// Ajoute une liste de Charge à la collection
57 public void AddRange(PropertyController
[] value)
59 for (int i
= 0; i
< value.Length
; i
++)
66 /// Ajoute une liste de Charge à la collection
68 public void AddRange(PropertyControllerCollection
value)
70 for (int i
= 0; i
< value.Count
; i
++)
77 /// Indique si un(e) Charge appartient à la collection
79 /// <param name="value">Un(e) Charge</param>
80 /// <returns>Renvoir vrai s'il/elle appartinet à la collection</returns>
81 public bool Contains(PropertyController
value)
83 return List
.Contains(value);
88 /// Copie la collection dans un tableau de Charge
90 /// <param name="array">Un tableau de Charge</param>
91 /// <param name="index">Index de début de la copie dans le tableau</param>
92 public void CopyTo(PropertyController
[] array
, int index
)
94 List
.CopyTo(array
, index
);
98 /// Donne la position de l'agent dans la collection.
100 /// <param name="value">Un(e) Charge</param>
101 /// <returns>L'index de l'élément dans la collection.</returns>
102 public int IndexOf(PropertyController
value)
104 return List
.IndexOf(value);
108 /// Insére un(e) Charge dans la collection.
110 /// <param name="index">L'index d'insertion dans la collection.</param>
111 /// <param name="value">Un(e) Charge</param>
112 public void Insert(int index
, PropertyController
value)
114 List
.Insert(index
, value);
118 /// Enléve un(e) Charge de la collection.
120 public void Remove(PropertyController
value)