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
- SerializationSectionGroup.cs
- ValueProviderWrapper.cs
- Win32Native.cs
- Solver.cs
- SqlNodeAnnotation.cs
- TransformGroup.cs
- FormsAuthenticationUserCollection.cs
- LinqToSqlWrapper.cs
- DataControlFieldHeaderCell.cs
- LocalizationComments.cs
- MatrixCamera.cs
- Comparer.cs
- EntityFrameworkVersions.cs
- Activator.cs
- WSHttpTransportSecurityElement.cs
- Compensation.cs
- TripleDES.cs
- UntrustedRecipientException.cs
- TypeToArgumentTypeConverter.cs
- TextBoxBaseDesigner.cs
- Parser.cs
- odbcmetadatafactory.cs
- PropertyGroupDescription.cs
- LateBoundBitmapDecoder.cs
- EnvironmentPermission.cs
- Config.cs
- ReflectionUtil.cs
- AssemblyInfo.cs
- ManagementNamedValueCollection.cs
- DataGridRowEventArgs.cs
- HTMLTagNameToTypeMapper.cs
- CultureMapper.cs
- XmlSchemaAnnotation.cs
- WebServiceMethodData.cs
- MessagePropertyDescription.cs
- BrowserCapabilitiesFactory.cs
- DesignTimeXamlWriter.cs
- WhitespaceRule.cs
- DataError.cs
- ProcessHostMapPath.cs
- PasswordDeriveBytes.cs
- DockEditor.cs
- XmlSchemaDatatype.cs
- DataGridLength.cs
- MenuAutomationPeer.cs
- LineInfo.cs
- MultiTrigger.cs
- CodeArrayCreateExpression.cs
- LogicalExpr.cs
- DataColumnSelectionConverter.cs
- TaskFileService.cs
- SmiMetaDataProperty.cs
- Typography.cs
- MenuItem.cs
- SmtpReplyReaderFactory.cs
- DateTimeSerializationSection.cs
- InternalConfigRoot.cs
- Module.cs
- InsufficientMemoryException.cs
- AbstractDataSvcMapFileLoader.cs
- CompilerTypeWithParams.cs
- SelectionPattern.cs
- RequestTimeoutManager.cs
- GuidTagList.cs
- DeferredElementTreeState.cs
- NullReferenceException.cs
- InputScope.cs
- Predicate.cs
- BuildProviderInstallComponent.cs
- FlowNode.cs
- DataConnectionHelper.cs
- SiteMapNodeItemEventArgs.cs
- LookupNode.cs
- FileSystemInfo.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- SkewTransform.cs
- SqlFileStream.cs
- MailMessageEventArgs.cs
- Ipv6Element.cs
- ReadOnlyHierarchicalDataSource.cs
- XamlFrame.cs
- EncodingInfo.cs
- RotateTransform.cs
- ProcessInputEventArgs.cs
- ServiceOperationInfoTypeConverter.cs
- InlineObject.cs
- ChildTable.cs
- TextRangeSerialization.cs
- InputScopeConverter.cs
- ItemContainerProviderWrapper.cs
- HtmlListAdapter.cs
- BindingGroup.cs
- Popup.cs
- WebConvert.cs
- CustomBindingCollectionElement.cs
- UnmanagedMemoryStreamWrapper.cs
- Merger.cs
- Header.cs
- Vector3DAnimation.cs
- SerializerWriterEventHandlers.cs