//
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
+// Chris Toshok (toshok@ximian.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004,2005 Novell, Inc (http://www.novell.com)
//
//
namespace System.Web.Configuration
{
+ [ConfigurationCollection (typeof (AssemblyInfo), CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
public sealed class AssemblyCollection: ConfigurationElementCollection
{
+ static ConfigurationPropertyCollection properties;
+
+ static AssemblyCollection ()
+ {
+ properties = new ConfigurationPropertyCollection();
+ }
+
public void Add (AssemblyInfo info)
{
BaseAdd (info);
{
BaseRemoveAt (index);
}
-
- public AssemblyInfo this [int n]
- {
- get { return (AssemblyInfo) BaseGet (n); }
+
+ public AssemblyInfo this [int index] {
+ get { return (AssemblyInfo) BaseGet (index); }
+ set { if (BaseGet(index) != null) BaseRemoveAt(index); BaseAdd(index, value); }
+ }
+
+ public new AssemblyInfo this [string assemblyName] {
+ get { return (AssemblyInfo) BaseGet (assemblyName); }
+ }
+
+
+ protected override ConfigurationPropertyCollection Properties {
+ get { return properties; }
}
}
}