Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PixelFormats.cs
- DesignerActionUIStateChangeEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- AlternateView.cs
- GAC.cs
- DbProviderSpecificTypePropertyAttribute.cs
- Divide.cs
- CodeExpressionStatement.cs
- OleDragDropHandler.cs
- BaseProcessor.cs
- CornerRadiusConverter.cs
- StringFreezingAttribute.cs
- VirtualDirectoryMappingCollection.cs
- NavigationPropertyEmitter.cs
- InvalidDataException.cs
- ContextMenu.cs
- MaskDescriptors.cs
- ExpressionNode.cs
- ConfigXmlElement.cs
- KeyedHashAlgorithm.cs
- DelegateSerializationHolder.cs
- GlobalDataBindingHandler.cs
- GorillaCodec.cs
- ColorContextHelper.cs
- MissingFieldException.cs
- SurrogateSelector.cs
- SQLInt64Storage.cs
- BuildManager.cs
- HtmlEncodedRawTextWriter.cs
- Root.cs
- PersonalizationAdministration.cs
- XPathAncestorIterator.cs
- X509SecurityTokenParameters.cs
- IdentifierService.cs
- IRCollection.cs
- DetailsViewUpdateEventArgs.cs
- Span.cs
- ToolbarAUtomationPeer.cs
- MultipleViewProviderWrapper.cs
- AssemblyName.cs
- OperatingSystem.cs
- ToolStripItemImageRenderEventArgs.cs
- TextBox.cs
- SerializerProvider.cs
- BodyWriter.cs
- CancelEventArgs.cs
- PartialTrustVisibleAssembliesSection.cs
- ComponentChangedEvent.cs
- ErrorFormatterPage.cs
- ContentOperations.cs
- XmlSchemaInferenceException.cs
- Span.cs
- XamlPointCollectionSerializer.cs
- Adorner.cs
- RepeatButton.cs
- COM2ColorConverter.cs
- TrustSection.cs
- MetadataItemCollectionFactory.cs
- WeakReferenceEnumerator.cs
- Events.cs
- XPathSingletonIterator.cs
- UnionCodeGroup.cs
- SystemUnicastIPAddressInformation.cs
- CompareInfo.cs
- MenuStrip.cs
- SystemInfo.cs
- ContentFilePart.cs
- Converter.cs
- WebPartRestoreVerb.cs
- TriggerBase.cs
- BodyGlyph.cs
- Queue.cs
- ColumnWidthChangingEvent.cs
- XmlIlVisitor.cs
- MethodSet.cs
- HtmlInputControl.cs
- PageAdapter.cs
- ProcessInfo.cs
- CompoundFileIOPermission.cs
- WebConfigurationManager.cs
- OutOfMemoryException.cs
- HttpFileCollection.cs
- ZipFileInfo.cs
- XmlMembersMapping.cs
- DebugView.cs
- CollectionView.cs
- ICollection.cs
- Menu.cs
- LinkUtilities.cs
- Content.cs
- ProtocolProfile.cs
- ArgumentValidation.cs
- HtmlMobileTextWriter.cs
- InkCanvasSelection.cs
- Operator.cs
- UnsafeNativeMethodsTablet.cs
- BitmapFrameDecode.cs
- WinEventHandler.cs
- ConfigurationElement.cs
- RequestNavigateEventArgs.cs