Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Data / System / Data / Common / NameValuePair.cs / 1 / 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
- TrackBar.cs
- basecomparevalidator.cs
- DBSchemaTable.cs
- ExtenderProviderService.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- GraphicsContext.cs
- AliasExpr.cs
- ClientBuildManagerCallback.cs
- SymbolDocumentGenerator.cs
- NameValueCollection.cs
- AsymmetricSignatureFormatter.cs
- DocumentGrid.cs
- mediapermission.cs
- InkCanvasSelection.cs
- StreamWithDictionary.cs
- IssuedTokenServiceElement.cs
- CookielessHelper.cs
- FixUpCollection.cs
- ToolStripItemCollection.cs
- BuilderPropertyEntry.cs
- DataGridViewColumnCollection.cs
- SelectedDatesCollection.cs
- assemblycache.cs
- DefaultEventAttribute.cs
- EventSource.cs
- XmlSchemaSimpleTypeRestriction.cs
- ExceptionTrace.cs
- CollectionViewProxy.cs
- ManagementDateTime.cs
- CngUIPolicy.cs
- SubMenuStyle.cs
- DynamicMethod.cs
- ThrowHelper.cs
- XmlCollation.cs
- DataGrid.cs
- XmlSchemaValidator.cs
- ListenerAdaptersInstallComponent.cs
- XmlQueryOutput.cs
- RadioButtonAutomationPeer.cs
- ResourceReader.cs
- CodeDefaultValueExpression.cs
- XmlAnyElementAttributes.cs
- RecordBuilder.cs
- MissingManifestResourceException.cs
- Point3DCollection.cs
- PartialCachingAttribute.cs
- ImageBrush.cs
- TemplatingOptionsDialog.cs
- IdentityManager.cs
- KeyInfo.cs
- MetadataFile.cs
- RichTextBoxAutomationPeer.cs
- ScaleTransform3D.cs
- Transform3D.cs
- CroppedBitmap.cs
- ActivityExecutorOperation.cs
- PageSetupDialog.cs
- CompoundFileStreamReference.cs
- AssociationTypeEmitter.cs
- AttributeData.cs
- ColorAnimationUsingKeyFrames.cs
- MessageHeaderDescriptionCollection.cs
- SinglePageViewer.cs
- HttpValueCollection.cs
- TemplateXamlTreeBuilder.cs
- ELinqQueryState.cs
- SettingsAttributes.cs
- RegisteredHiddenField.cs
- safelinkcollection.cs
- DataGridViewHeaderCell.cs
- COSERVERINFO.cs
- ObjectItemCollection.cs
- SortFieldComparer.cs
- ExpressionValueEditor.cs
- RepeaterCommandEventArgs.cs
- Calendar.cs
- DebugController.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- ZipFileInfo.cs
- RegisteredArrayDeclaration.cs
- WinInet.cs
- NotCondition.cs
- JournalEntryListConverter.cs
- TraceHandler.cs
- securestring.cs
- OleDbRowUpdatedEvent.cs
- HandlerFactoryWrapper.cs
- Events.cs
- SolidColorBrush.cs
- ServicePoint.cs
- ConfigurationSection.cs
- OrderedEnumerableRowCollection.cs
- FormViewPageEventArgs.cs
- ProcessInfo.cs
- ReceiveParametersContent.cs
- TemplateComponentConnector.cs
- DisplayInformation.cs
- ScriptRegistrationManager.cs
- CalendarDay.cs
- SafeSecurityHandles.cs