1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 using System
.Collections
;
21 /// Collection of <see cref="DependencyModel"/>.
26 public class DependencyModelCollection
: ReadOnlyCollectionBase
29 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
31 public DependencyModelCollection()
36 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
38 /// <param name="dependencies">The dependencies.</param>
39 public DependencyModelCollection(DependencyModelCollection dependencies
)
41 InnerList
.AddRange(dependencies
);
45 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
47 /// <param name="dependencies">The dependencies.</param>
48 public DependencyModelCollection(DependencyModel
[] dependencies
)
50 InnerList
.AddRange(dependencies
);
54 /// Adds the specified model.
56 /// <param name="model">The model.</param>
57 public void Add(DependencyModel model
)
63 /// Removes the specified model.
65 /// <param name="model">The model.</param>
66 public void Remove(DependencyModel model
)
68 InnerList
.Remove(model
);
72 /// Clears this instance.
80 /// Determines whether this collection contains the the specified model.
82 /// <param name="model">The model.</param>
84 /// <c>true</c> if the collection contains the specified model; otherwise, <c>false</c>.
86 public bool Contains(DependencyModel model
)
88 return InnerList
.Contains(model
);