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
- ZipIOCentralDirectoryFileHeader.cs
- TextEditorCharacters.cs
- UnsafeNativeMethods.cs
- FieldNameLookup.cs
- JobCollate.cs
- EntityCommand.cs
- BufferedGraphicsContext.cs
- DataSourceListEditor.cs
- SessionParameter.cs
- IisTraceListener.cs
- XmlSchemaGroup.cs
- PackageRelationshipSelector.cs
- ExceptionNotification.cs
- BasicViewGenerator.cs
- DataGridViewSelectedColumnCollection.cs
- PieceDirectory.cs
- DataColumn.cs
- InputLanguage.cs
- ProcessStartInfo.cs
- HandleTable.cs
- TextWriter.cs
- DynamicHyperLink.cs
- PhysicalAddress.cs
- _HeaderInfo.cs
- Calendar.cs
- SrgsElement.cs
- MetabaseServerConfig.cs
- DocumentSequence.cs
- UpnEndpointIdentity.cs
- SQLInt32.cs
- PerformanceCounterPermission.cs
- FileLevelControlBuilderAttribute.cs
- ReferencedType.cs
- Condition.cs
- CodeSnippetStatement.cs
- ReferencedCollectionType.cs
- MULTI_QI.cs
- LinqDataSourceStatusEventArgs.cs
- Command.cs
- listitem.cs
- ReachPrintTicketSerializerAsync.cs
- ConstructorBuilder.cs
- ErrorsHelper.cs
- AuthStoreRoleProvider.cs
- ResponseStream.cs
- MultiDataTrigger.cs
- ClientSettingsProvider.cs
- DataServiceRequestOfT.cs
- WebZone.cs
- RequiredAttributeAttribute.cs
- DataRelationCollection.cs
- MarkupWriter.cs
- OverflowException.cs
- DbConnectionPoolGroupProviderInfo.cs
- RegexReplacement.cs
- WebServiceTypeData.cs
- WindowsScrollBar.cs
- NGCSerializationManager.cs
- TreeView.cs
- FormViewCommandEventArgs.cs
- BrushConverter.cs
- __Error.cs
- Internal.cs
- FigureParaClient.cs
- EndpointDispatcherTable.cs
- DependencyPropertyAttribute.cs
- XmlKeywords.cs
- ToolStripControlHost.cs
- TemplateControlCodeDomTreeGenerator.cs
- PersistNameAttribute.cs
- StrokeIntersection.cs
- Point.cs
- HMACSHA256.cs
- Timer.cs
- WizardStepBase.cs
- ToolStripPanelCell.cs
- ApplicationDirectoryMembershipCondition.cs
- COM2PropertyPageUITypeConverter.cs
- Timer.cs
- counter.cs
- FolderBrowserDialog.cs
- DataServiceSaveChangesEventArgs.cs
- CancellationHandler.cs
- TransformerConfigurationWizardBase.cs
- EntryPointNotFoundException.cs
- SecurityTokenException.cs
- CodeNamespaceImport.cs
- XPathParser.cs
- PresentationTraceSources.cs
- XmlNotation.cs
- Lease.cs
- codemethodreferenceexpression.cs
- DesignTimeVisibleAttribute.cs
- sortedlist.cs
- BinaryHeap.cs
- ContentElementAutomationPeer.cs
- DataGridHelper.cs
- LinqDataSourceStatusEventArgs.cs
- SettingsProperty.cs
- MetadataProperty.cs