rendered paste bodyIndex: ProviderBase.cs
===================================================================
--- ProviderBase.cs (revision 68842)
+++ ProviderBase.cs (working copy)
@@ -36,12 +36,22 @@
{
public abstract class ProviderBase
{
+ bool alreadyInitialized;
+
protected ProviderBase ()
{
}
public virtual void Initialize (string name, NameValueCollection config)
{
+ if (name == null)
+ throw new ArgumentNullException ("name");
+ if (name.Length == 0)
+ throw new ArgumentException ("name must not be empty");
+ if (alreadyInitialized)
+ throw new InvalidOperation ("Provider has already been initialized");
+ alreadyInitialized = true;
+
_name = name;
if (config != null)