Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ProviderBase.cs / 1305376 / 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
- ProcessHostFactoryHelper.cs
- HwndTarget.cs
- EventSinkHelperWriter.cs
- DoubleCollectionValueSerializer.cs
- DesignRelationCollection.cs
- MethodToken.cs
- UInt64Storage.cs
- AuthorizationRule.cs
- IgnoreFileBuildProvider.cs
- SqlTopReducer.cs
- VisualStateChangedEventArgs.cs
- RemotingException.cs
- TypeDependencyAttribute.cs
- BinaryObjectReader.cs
- XPathNodePointer.cs
- TraceHandlerErrorFormatter.cs
- ConfigXmlSignificantWhitespace.cs
- TraceShell.cs
- IgnoreFileBuildProvider.cs
- Rect3DConverter.cs
- DesignerExtenders.cs
- GenericUI.cs
- IndexObject.cs
- CodeGotoStatement.cs
- ElementMarkupObject.cs
- CollectionView.cs
- SmtpNtlmAuthenticationModule.cs
- GeometryModel3D.cs
- OdbcConnectionString.cs
- TreeViewItemAutomationPeer.cs
- UnsafeNativeMethods.cs
- HostingEnvironmentSection.cs
- hebrewshape.cs
- Image.cs
- ExtenderControl.cs
- PageBuildProvider.cs
- BreadCrumbTextConverter.cs
- DataGridCell.cs
- Frame.cs
- Schema.cs
- PopupEventArgs.cs
- DataGridViewColumnEventArgs.cs
- VirtualDirectoryMapping.cs
- HtmlShim.cs
- WindowsFormsHost.cs
- FormsAuthenticationModule.cs
- OracleEncoding.cs
- FormsAuthenticationUserCollection.cs
- ValidationPropertyAttribute.cs
- FileAuthorizationModule.cs
- GlyphRunDrawing.cs
- FirewallWrapper.cs
- ObjectListComponentEditor.cs
- CLSCompliantAttribute.cs
- SqlInternalConnectionTds.cs
- DataGridState.cs
- EventPropertyMap.cs
- StrokeCollectionConverter.cs
- CollectionCodeDomSerializer.cs
- XhtmlMobileTextWriter.cs
- SimpleTypeResolver.cs
- BaseDataList.cs
- DataBoundControlHelper.cs
- UnhandledExceptionEventArgs.cs
- sapiproxy.cs
- ProfileElement.cs
- MimePart.cs
- WindowHideOrCloseTracker.cs
- TemplateNodeContextMenu.cs
- TrustManagerMoreInformation.cs
- SqlException.cs
- AsmxEndpointPickerExtension.cs
- Site.cs
- TimersDescriptionAttribute.cs
- SafeFindHandle.cs
- HTMLTagNameToTypeMapper.cs
- InheritanceService.cs
- ProjectionPathSegment.cs
- ZipQueryOperator.cs
- ZoneButton.cs
- SqlBulkCopyColumnMapping.cs
- StaticResourceExtension.cs
- SettingsProviderCollection.cs
- DiagnosticTraceRecords.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- AspNetSynchronizationContext.cs
- CellConstant.cs
- ComponentEvent.cs
- FormsAuthenticationModule.cs
- Inflater.cs
- DataKey.cs
- XmlILConstructAnalyzer.cs
- OleDbParameterCollection.cs
- TypeLibConverter.cs
- StaticSiteMapProvider.cs
- CatchBlock.cs
- XmlSchemaExporter.cs
- Lookup.cs
- DateTimeOffsetAdapter.cs
- DrawingCollection.cs