// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
-#if NET_2_0
using System.Collections;
namespace System.Configuration
{
public sealed class ElementInformation
{
- PropertyInformation propertyInfo;
- ConfigurationElement owner;
- PropertyInformationCollection properties;
-
+ readonly PropertyInformation propertyInfo;
+ readonly ConfigurationElement owner;
+ readonly PropertyInformationCollection properties;
+
internal ElementInformation (ConfigurationElement owner, PropertyInformation propertyInfo)
{
this.propertyInfo = propertyInfo;
this.owner = owner;
+
+ properties = new PropertyInformationCollection ();
+ foreach (ConfigurationProperty prop in owner.Properties)
+ properties.Add (new PropertyInformation (owner, prop));
}
-
+
+ [MonoTODO]
+ public ICollection Errors {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
public bool IsCollection {
get { return owner is ConfigurationElementCollection; }
}
get { return propertyInfo != null ? propertyInfo.IsLocked : false; }
}
- [MonoTODO]
+ [MonoTODO("Support multiple levels of inheritance")]
public bool IsPresent {
- get { return propertyInfo != null; }
+ get { return owner.IsElementPresent; }
}
public int LineNumber {
}
public ConfigurationValidatorBase Validator {
- get { return propertyInfo != null ? propertyInfo.Validator : null; }
+ get { return propertyInfo != null ? propertyInfo.Validator : new DefaultValidator(); }
}
public PropertyInformationCollection Properties {
- get {
- if (properties == null) {
- properties = new PropertyInformationCollection ();
- foreach (ConfigurationProperty prop in owner.Properties)
- properties.Add (new PropertyInformation (owner, prop));
- }
- return properties;
- }
+ get { return properties; }
}
internal void Reset (ElementInformation parentInfo)
}
}
}
-#endif
+