1 // Copyright 2003-2004 DigitalCraftsmen - http://www.digitalcraftsmen.com.br/
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.
15 namespace Castle
.ManagementExtensions
.Default
18 using System
.Collections
;
19 using System
.Collections
.Specialized
;
22 /// Summary description for DomainCollection.
24 public class DomainCollection
: NameObjectCollectionBase
, IEnumerable
26 public DomainCollection() :
27 base(CaseInsensitiveHashCodeProvider
.Default
, CaseInsensitiveComparer
.Default
)
31 public void Add(Domain domain
)
35 base.BaseAdd(domain
.Name
, domain
);
39 public Domain
this[String domainName
]
43 return base.BaseGet(domainName
) as Domain
;
47 public String
[] ToArray()
51 String
[] names
= new String
[base.Keys
.Count
];
53 foreach(String key
in base.Keys
)
61 #region IEnumerable Members
63 public new IEnumerator
GetEnumerator()
65 return base.BaseGetAllValues().GetEnumerator();