// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Collections;
using System.Configuration;
namespace System.Web.Configuration
{
+ [ConfigurationCollection (typeof (ExpressionBuilder), CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
public sealed class ExpressionBuilderCollection : ConfigurationElementCollection
{
static ConfigurationPropertyCollection props;
static ExpressionBuilderCollection ()
{
props = new ConfigurationPropertyCollection ();
- ConfigurationPropertyOptions flags = ConfigurationPropertyOptions.IsDefaultCollection;
- ConfigurationProperty prop = new ConfigurationProperty (null, typeof (ExpressionBuilderCollection), null, flags);
- props.Add (prop);
}
public ExpressionBuilderCollection (): base (CaseInsensitiveComparer.DefaultInvariant)
public ExpressionBuilder this [int index] {
get { return (ExpressionBuilder) BaseGet (index); }
- set {
- if (BaseGet (index) != null)
- BaseRemoveAt (index);
-
- BaseAdd (index, value);
- }
+ set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
}
public new ExpressionBuilder this [string name] {
get { return (ExpressionBuilder) BaseGet (name); }
}
- protected override ConfigurationPropertyCollection Properties {
+ protected internal override ConfigurationPropertyCollection Properties {
get { return props; }
}
}
}
}
-#endif // NET_2_0