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 Domain.
24 public class Domain
: DictionaryBase
26 protected String name
;
33 public Domain(String name
)
38 public void Add(ManagedObjectName objectName
, Entry instance
)
42 InnerHashtable
.Add(objectName
, instance
);
46 public bool Contains(ManagedObjectName objectName
)
48 return InnerHashtable
.ContainsKey(objectName
);
51 public void Remove(ManagedObjectName objectName
)
55 InnerHashtable
.Remove(objectName
);
71 public Entry
this[ManagedObjectName objectName
]
75 return (Entry
) InnerHashtable
[objectName
];
79 public ManagedObjectName
[] ToArray()
84 ManagedObjectName
[] names
= new ManagedObjectName
[ Count
];
85 foreach(ManagedObjectName name
in InnerHashtable
.Keys
)
87 names
[index
++] = name
;