// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
+using System.Collections;
+#if (CONFIGURATION_DEP)
using System.Configuration.Provider;
+#endif
namespace System.Configuration
{
- public class SettingsProviderCollection : System.Configuration.Provider.ProviderCollection
+ public class SettingsProviderCollection
+#if (CONFIGURATION_DEP)
+ : ProviderCollection
+#endif
{
public SettingsProviderCollection ()
{
- throw new NotImplementedException ();
}
+#if (CONFIGURATION_DEP)
public override void Add (ProviderBase provider)
{
- throw new NotImplementedException ();
+ if (!(provider is SettingsProvider))
+ throw new ArgumentException ("SettingsProvider is expected");
+ if (String.IsNullOrEmpty (provider.Name))
+ throw new ArgumentException ("Provider name cannot be null or empty");
+ base.Add (provider);
}
public new SettingsProvider this [ string name ] {
get {
- throw new NotImplementedException ();
+ return (SettingsProvider) base [ name ];
}
}
+#endif
}
}
-#endif