Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Configuration / System / Configuration / ProviderBase.cs / 1 / ProviderBase.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Configuration.Provider {
using System.Collections.Specialized;
using System.Runtime.Serialization;
public abstract class ProviderBase {
private string _name;
private string _Description;
public virtual string Name { get { return _name; } }
public virtual string Description { get { return string.IsNullOrEmpty(_Description) ? Name : _Description; } }
public virtual void Initialize(string name, NameValueCollection config) {
lock (this) {
if (_Initialized)
throw new InvalidOperationException(SR.GetString(SR.Provider_Already_Initialized));
_Initialized = true;
}
if (name == null)
throw new ArgumentNullException("name");
if (name.Length == 0)
throw new ArgumentException(SR.GetString(SR.Config_provider_name_null_or_empty), "name");
_name = name;
if (config != null) {
_Description = config["description"];
config.Remove("description");
}
}
private bool _Initialized;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Configuration.Provider {
using System.Collections.Specialized;
using System.Runtime.Serialization;
public abstract class ProviderBase {
private string _name;
private string _Description;
public virtual string Name { get { return _name; } }
public virtual string Description { get { return string.IsNullOrEmpty(_Description) ? Name : _Description; } }
public virtual void Initialize(string name, NameValueCollection config) {
lock (this) {
if (_Initialized)
throw new InvalidOperationException(SR.GetString(SR.Provider_Already_Initialized));
_Initialized = true;
}
if (name == null)
throw new ArgumentNullException("name");
if (name.Length == 0)
throw new ArgumentException(SR.GetString(SR.Config_provider_name_null_or_empty), "name");
_name = name;
if (config != null) {
_Description = config["description"];
config.Remove("description");
}
}
private bool _Initialized;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StoreAnnotationsMap.cs
- CoTaskMemSafeHandle.cs
- ApplicationException.cs
- BuilderPropertyEntry.cs
- DefaultBindingPropertyAttribute.cs
- DragEvent.cs
- ButtonPopupAdapter.cs
- XmlQueryOutput.cs
- StylusPointPropertyInfoDefaults.cs
- CodeObject.cs
- userdatakeys.cs
- FlatButtonAppearance.cs
- ISAPIRuntime.cs
- BamlRecordReader.cs
- XmlRawWriterWrapper.cs
- Cursors.cs
- SevenBitStream.cs
- SessionViewState.cs
- HtmlInputText.cs
- WbemProvider.cs
- PeerPresenceInfo.cs
- mansign.cs
- ExpandedProjectionNode.cs
- StateMachineWorkflowDesigner.cs
- TemplateManager.cs
- QueryIntervalOp.cs
- ListenerPerfCounters.cs
- Int64KeyFrameCollection.cs
- BitmapEffectCollection.cs
- KeyConverter.cs
- ExpressionEditorAttribute.cs
- WindowsSysHeader.cs
- ResourceSet.cs
- WindowsAuthenticationModule.cs
- IconConverter.cs
- XmlSchemaAttributeGroup.cs
- TdsParserSessionPool.cs
- BaseAsyncResult.cs
- InnerItemCollectionView.cs
- AsyncPostBackErrorEventArgs.cs
- UndoManager.cs
- validationstate.cs
- ContentDisposition.cs
- DataTableCollection.cs
- ErrorFormatterPage.cs
- AuthorizationRuleCollection.cs
- CacheChildrenQuery.cs
- XmlSchemaValidator.cs
- OdbcCommandBuilder.cs
- CatalogZoneDesigner.cs
- Drawing.cs
- PersonalizableTypeEntry.cs
- ButtonFlatAdapter.cs
- Control.cs
- XmlIterators.cs
- BuildProvider.cs
- XmlName.cs
- RecipientIdentity.cs
- OptionalRstParameters.cs
- Rectangle.cs
- CodeMemberField.cs
- ManagementDateTime.cs
- DataPager.cs
- SmiEventSink_DeferedProcessing.cs
- ServerIdentity.cs
- Icon.cs
- WebPart.cs
- ServiceProviders.cs
- XmlIgnoreAttribute.cs
- WebPartEditorCancelVerb.cs
- SoapSchemaMember.cs
- DelegateTypeInfo.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- XmlIgnoreAttribute.cs
- CommandDevice.cs
- WebPartsSection.cs
- Selection.cs
- CodeGenerator.cs
- IResourceProvider.cs
- WebPartEditorCancelVerb.cs
- NetDataContractSerializer.cs
- UDPClient.cs
- ObjectNotFoundException.cs
- WebPartManagerInternals.cs
- ToolStripManager.cs
- PropertyChangeTracker.cs
- TextTreeText.cs
- XmlILOptimizerVisitor.cs
- FontStyles.cs
- FlowStep.cs
- DemultiplexingClientMessageFormatter.cs
- ConfigXmlWhitespace.cs
- CqlIdentifiers.cs
- GradientStop.cs
- TreeNodeStyleCollection.cs
- KeyFrames.cs
- XmlSchemaProviderAttribute.cs
- CommandPlan.cs
- PopupRoot.cs
- RNGCryptoServiceProvider.cs