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
- SqlNotificationRequest.cs
- RecognizerStateChangedEventArgs.cs
- LineSegment.cs
- ISAPIRuntime.cs
- ValidationEventArgs.cs
- CheckBoxField.cs
- HTTPNotFoundHandler.cs
- TypeUtil.cs
- System.Data_BID.cs
- smtpconnection.cs
- X509Chain.cs
- XmlSchemaDocumentation.cs
- CustomLineCap.cs
- StorageTypeMapping.cs
- UpdatePanelTrigger.cs
- InfiniteIntConverter.cs
- StringUtil.cs
- SettingsPropertyCollection.cs
- DependentList.cs
- ResizeGrip.cs
- ImageMap.cs
- FormsAuthenticationModule.cs
- NonParentingControl.cs
- MethodCallExpression.cs
- DataSourceHelper.cs
- GridViewPageEventArgs.cs
- XmlNullResolver.cs
- KeyManager.cs
- DesignerDataParameter.cs
- XmlSerializerVersionAttribute.cs
- InsufficientMemoryException.cs
- SpoolingTaskBase.cs
- GridEntryCollection.cs
- ChildDocumentBlock.cs
- _NestedSingleAsyncResult.cs
- PropertyConverter.cs
- BehaviorEditorPart.cs
- IsolatedStorageFileStream.cs
- RestHandlerFactory.cs
- DBDataPermission.cs
- XPathNodeIterator.cs
- MsmqElementBase.cs
- NamespaceEmitter.cs
- WinHttpWebProxyFinder.cs
- ServiceHost.cs
- ExtensibleClassFactory.cs
- Matrix3D.cs
- GeneralTransform3D.cs
- RoutedCommand.cs
- sqlstateclientmanager.cs
- SchemaImporter.cs
- PersonalizationProviderHelper.cs
- ApplyImportsAction.cs
- _BaseOverlappedAsyncResult.cs
- PackageProperties.cs
- ModifierKeysConverter.cs
- CqlErrorHelper.cs
- CategoryNameCollection.cs
- PagedControl.cs
- QilGeneratorEnv.cs
- StorageInfo.cs
- IDispatchConstantAttribute.cs
- DataTable.cs
- OleDbRowUpdatedEvent.cs
- CodePrimitiveExpression.cs
- ConsumerConnectionPointCollection.cs
- MemberJoinTreeNode.cs
- SiteOfOriginContainer.cs
- LogRecordSequence.cs
- SqlNode.cs
- FontConverter.cs
- ConfigurationPropertyAttribute.cs
- FontNamesConverter.cs
- HttpRuntime.cs
- FrameworkElement.cs
- XmlWellformedWriter.cs
- Funcletizer.cs
- ReflectEventDescriptor.cs
- ExceptionHandler.cs
- basemetadatamappingvisitor.cs
- OleDbDataAdapter.cs
- HttpListenerRequest.cs
- OleDbReferenceCollection.cs
- Helper.cs
- SafeHandles.cs
- X509ClientCertificateCredentialsElement.cs
- EntityDesignerBuildProvider.cs
- DataContractAttribute.cs
- GridItemPatternIdentifiers.cs
- FutureFactory.cs
- MessagingDescriptionAttribute.cs
- FileSystemEnumerable.cs
- MetadataItemCollectionFactory.cs
- PersonalizationDictionary.cs
- ProfileSettings.cs
- WebPartConnectionsConnectVerb.cs
- ToolStripLabel.cs
- HtmlTableCellCollection.cs
- Codec.cs
- CodeMemberMethod.cs