Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Common / NameValuePair.cs / 1305376 / NameValuePair.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- #if ORACLE namespace System.Data.OracleClient { #else namespace System.Data.Common { #endif using System; using System.Data.Common; using System.Diagnostics; using System.Runtime.Serialization; [Serializable] // MDAC 83147 sealed internal class NameValuePair { readonly private string _name; readonly private string _value; [OptionalField(VersionAdded=2)] readonly private int _length; private NameValuePair _next; internal NameValuePair(string name, string value, int length) { System.Diagnostics.Debug.Assert(!ADP.IsEmpty(name), "empty keyname"); _name = name; _value = value; _length = length; } internal int Length { get { // this property won't exist when deserialized from Everett to Whidbey // it shouldn't matter for DbConnectionString/DbDataPermission // which should only use Length during construction // not deserialization or post-ctor runtime Debug.Assert(0 < _length, "NameValuePair zero Length usage"); return _length; } } internal string Name { get { return _name; } } internal NameValuePair Next { get { return _next; } set { if ((null != _next) || (null == value)) { throw ADP.InternalError(ADP.InternalErrorCode.NameValuePairNext); } _next = value; } } internal string Value { get { return _value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- #if ORACLE namespace System.Data.OracleClient { #else namespace System.Data.Common { #endif using System; using System.Data.Common; using System.Diagnostics; using System.Runtime.Serialization; [Serializable] // MDAC 83147 sealed internal class NameValuePair { readonly private string _name; readonly private string _value; [OptionalField(VersionAdded=2)] readonly private int _length; private NameValuePair _next; internal NameValuePair(string name, string value, int length) { System.Diagnostics.Debug.Assert(!ADP.IsEmpty(name), "empty keyname"); _name = name; _value = value; _length = length; } internal int Length { get { // this property won't exist when deserialized from Everett to Whidbey // it shouldn't matter for DbConnectionString/DbDataPermission // which should only use Length during construction // not deserialization or post-ctor runtime Debug.Assert(0 < _length, "NameValuePair zero Length usage"); return _length; } } internal string Name { get { return _name; } } internal NameValuePair Next { get { return _next; } set { if ((null != _next) || (null == value)) { throw ADP.InternalError(ADP.InternalErrorCode.NameValuePairNext); } _next = value; } } internal string Value { get { return _value; } } } } // 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
- NullableDoubleMinMaxAggregationOperator.cs
- JoinQueryOperator.cs
- CallTemplateAction.cs
- OpenFileDialog.cs
- RuleInfoComparer.cs
- Helpers.cs
- StubHelpers.cs
- ArrayList.cs
- TextServicesCompartmentEventSink.cs
- RegexReplacement.cs
- cryptoapiTransform.cs
- XmlIgnoreAttribute.cs
- RootBrowserWindow.cs
- PackageProperties.cs
- ConfigurationConverterBase.cs
- loginstatus.cs
- TextEffectResolver.cs
- DSASignatureFormatter.cs
- ExtensibleClassFactory.cs
- UnsafeNativeMethods.cs
- Substitution.cs
- MarshalByRefObject.cs
- WCFBuildProvider.cs
- SystemIPAddressInformation.cs
- WebServiceMethodData.cs
- ExpressionDumper.cs
- InstanceHandleConflictException.cs
- ConfigXmlReader.cs
- ProviderUtil.cs
- EncryptedData.cs
- AnnotationService.cs
- StylusSystemGestureEventArgs.cs
- FileUtil.cs
- InkCanvasSelection.cs
- ConfigurationConverterBase.cs
- PublishLicense.cs
- JsonQueryStringConverter.cs
- DataGridRow.cs
- Pointer.cs
- CancelEventArgs.cs
- CardSpaceShim.cs
- DoubleKeyFrameCollection.cs
- UriGenerator.cs
- ParameterCollection.cs
- TraversalRequest.cs
- RegistryKey.cs
- DBDataPermission.cs
- MetadataProperty.cs
- CommandSet.cs
- WindowsStatusBar.cs
- PartialCachingControl.cs
- BuildDependencySet.cs
- Memoizer.cs
- SlotInfo.cs
- DataObjectSettingDataEventArgs.cs
- UnsafeNativeMethods.cs
- PKCS1MaskGenerationMethod.cs
- InternalRelationshipCollection.cs
- WindowsSecurityTokenAuthenticator.cs
- DBConnectionString.cs
- PageCodeDomTreeGenerator.cs
- AppSecurityManager.cs
- SqlClientMetaDataCollectionNames.cs
- sqlser.cs
- BasePropertyDescriptor.cs
- SecUtil.cs
- XhtmlBasicCalendarAdapter.cs
- WebPartCatalogCloseVerb.cs
- Int32Storage.cs
- CreateParams.cs
- EditCommandColumn.cs
- OutputScopeManager.cs
- ComponentResourceManager.cs
- webeventbuffer.cs
- __Filters.cs
- TableLayoutStyleCollection.cs
- HeaderedItemsControl.cs
- SlipBehavior.cs
- XmlSerializerSection.cs
- HttpPostServerProtocol.cs
- QueryResult.cs
- ThreadAbortException.cs
- StylusPointDescription.cs
- XmlHierarchicalDataSourceView.cs
- TemplateXamlTreeBuilder.cs
- DbCommandDefinition.cs
- EventLogLink.cs
- GridViewSortEventArgs.cs
- WarningException.cs
- WinEventQueueItem.cs
- DbException.cs
- CompositionTarget.cs
- Inflater.cs
- QilStrConcatenator.cs
- ParameterRetriever.cs
- XmlHelper.cs
- ItemChangedEventArgs.cs
- InvalidFilterCriteriaException.cs
- ScrollEvent.cs
- LinkClickEvent.cs