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
- ButtonColumn.cs
- TextServicesLoader.cs
- ResourceProviderFactory.cs
- BezierSegment.cs
- _SSPIWrapper.cs
- SystemIPGlobalProperties.cs
- FacetChecker.cs
- EventPrivateKey.cs
- UriTemplate.cs
- RoleManagerSection.cs
- TypeSystem.cs
- Debug.cs
- SqlInternalConnectionTds.cs
- WindowsTab.cs
- ParsedAttributeCollection.cs
- SettingsContext.cs
- OutputCacheEntry.cs
- NotifyParentPropertyAttribute.cs
- ByteStream.cs
- ControlPropertyNameConverter.cs
- ObjectListSelectEventArgs.cs
- XmlSchemaRedefine.cs
- PathSegment.cs
- InvalidWMPVersionException.cs
- SchemaElementLookUpTable.cs
- SizeChangedEventArgs.cs
- FrugalMap.cs
- BitmapEffectDrawingContextWalker.cs
- ColorConvertedBitmap.cs
- CounterNameConverter.cs
- ObjectFullSpanRewriter.cs
- MessageSecurityVersion.cs
- WindowsIPAddress.cs
- XamlSerializerUtil.cs
- RequestCachePolicyConverter.cs
- EditingCommands.cs
- FormConverter.cs
- ElementNotEnabledException.cs
- DateTimeConstantAttribute.cs
- TextServicesManager.cs
- UnsafeNativeMethods.cs
- WebPartMovingEventArgs.cs
- WebPartEditorOkVerb.cs
- ConnectionStringsSection.cs
- CacheAxisQuery.cs
- ExtendedPropertyDescriptor.cs
- HeaderElement.cs
- CodeArgumentReferenceExpression.cs
- DmlSqlGenerator.cs
- Model3D.cs
- XamlReaderHelper.cs
- TableItemPatternIdentifiers.cs
- TypeDelegator.cs
- ConfigurationStrings.cs
- AttributeQuery.cs
- NullableLongSumAggregationOperator.cs
- ServiceModelTimeSpanValidator.cs
- AutoSizeToolBoxItem.cs
- Int64AnimationUsingKeyFrames.cs
- SoapExtensionReflector.cs
- AttachedPropertyInfo.cs
- InputReportEventArgs.cs
- IndexedString.cs
- LessThanOrEqual.cs
- TextRange.cs
- FlowDocumentScrollViewer.cs
- UIPermission.cs
- NameValueSectionHandler.cs
- BindingSource.cs
- ServiceObjectContainer.cs
- BufferManager.cs
- WindowsStatic.cs
- ChannelTracker.cs
- OdbcUtils.cs
- CompilationSection.cs
- DebuggerAttributes.cs
- GraphicsPath.cs
- SmiMetaData.cs
- NamedElement.cs
- WeakHashtable.cs
- StylusPointPropertyInfoDefaults.cs
- XmlSchemaInfo.cs
- GrammarBuilderRuleRef.cs
- X509Certificate2.cs
- BinaryCommonClasses.cs
- ResXResourceWriter.cs
- SqlTransaction.cs
- Preprocessor.cs
- SerializationInfoEnumerator.cs
- CodeAttributeDeclarationCollection.cs
- TabletDeviceInfo.cs
- ClientData.cs
- PeerCredential.cs
- ScopelessEnumAttribute.cs
- SchemaNamespaceManager.cs
- MatrixAnimationUsingKeyFrames.cs
- ExpressionVisitorHelpers.cs
- ConfigXmlComment.cs
- RegexStringValidatorAttribute.cs
- ScriptingSectionGroup.cs