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"/>.
24 public class DependencyModelCollection
: ReadOnlyCollectionBase
27 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
29 public DependencyModelCollection()
34 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
36 /// <param name="dependencies">The dependencies.</param>
37 public DependencyModelCollection(DependencyModelCollection dependencies
)
39 InnerList
.AddRange(dependencies
);
43 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
45 /// <param name="dependencies">The dependencies.</param>
46 public DependencyModelCollection(DependencyModel
[] dependencies
)
48 InnerList
.AddRange(dependencies
);
52 /// Adds the specified model.
54 /// <param name="model">The model.</param>
55 public void Add(DependencyModel model
)
61 /// Removes the specified model.
63 /// <param name="model">The model.</param>
64 public void Remove(DependencyModel model
)
66 InnerList
.Remove(model
);
70 /// Clears this instance.
78 /// Determines whether this collection contains the the specified model.
80 /// <param name="model">The model.</param>
82 /// <c>true</c> if the collection contains the specified model; otherwise, <c>false</c>.
84 public bool Contains(DependencyModel model
)
86 return InnerList
.Contains(model
);