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
- ScriptReference.cs
- ImageIndexConverter.cs
- WhitespaceRuleReader.cs
- XmlSchemaFacet.cs
- SqlDependencyUtils.cs
- SerializationAttributes.cs
- DataControlCommands.cs
- TreeViewAutomationPeer.cs
- QueryOutputWriter.cs
- ExtensibleClassFactory.cs
- Menu.cs
- EmptyControlCollection.cs
- MimeBasePart.cs
- WebPageTraceListener.cs
- SafeLocalMemHandle.cs
- InkCanvasAutomationPeer.cs
- SystemIPInterfaceProperties.cs
- GridViewUpdatedEventArgs.cs
- Bidi.cs
- DbExpressionRules.cs
- XmlLinkedNode.cs
- _UncName.cs
- AsyncCompletedEventArgs.cs
- IERequestCache.cs
- SqlGatherConsumedAliases.cs
- UrlMapping.cs
- ValidatorCompatibilityHelper.cs
- OleDbParameter.cs
- CommonProperties.cs
- HMACSHA512.cs
- TaskExceptionHolder.cs
- ValueType.cs
- DesignerEventService.cs
- ConstraintManager.cs
- ProxyHelper.cs
- SQLGuid.cs
- Visual3DCollection.cs
- RowUpdatedEventArgs.cs
- httpserverutility.cs
- UIAgentAsyncBeginRequest.cs
- ThreadStartException.cs
- Vars.cs
- FontFamilyValueSerializer.cs
- TransformGroup.cs
- CriticalFinalizerObject.cs
- Types.cs
- XmlObjectSerializer.cs
- Helper.cs
- SoapEnumAttribute.cs
- _SslSessionsCache.cs
- PrinterUnitConvert.cs
- XmlDocumentSchema.cs
- returneventsaver.cs
- XmlSchemaAnnotation.cs
- WrapPanel.cs
- UserThread.cs
- SecurityRequiresReviewAttribute.cs
- SweepDirectionValidation.cs
- SpellerHighlightLayer.cs
- Help.cs
- ValueHandle.cs
- BitmapEditor.cs
- PeerNearMe.cs
- PaintValueEventArgs.cs
- HttpCapabilitiesBase.cs
- Binding.cs
- SystemMulticastIPAddressInformation.cs
- CompilerTypeWithParams.cs
- SplitterPanel.cs
- ShellProvider.cs
- AutoResetEvent.cs
- MouseGestureValueSerializer.cs
- Section.cs
- UpdatePanel.cs
- Char.cs
- MergePropertyDescriptor.cs
- SoapExtensionReflector.cs
- TdsRecordBufferSetter.cs
- InlinedAggregationOperatorEnumerator.cs
- TreeViewTemplateSelector.cs
- UInt16.cs
- WindowsBrush.cs
- ZoomPercentageConverter.cs
- safelinkcollection.cs
- QuadraticBezierSegment.cs
- LowerCaseStringConverter.cs
- CaretElement.cs
- SmtpMail.cs
- XmlSchemaParticle.cs
- ArgumentDesigner.xaml.cs
- RenderingBiasValidation.cs
- QilStrConcat.cs
- ComponentDispatcher.cs
- PageCodeDomTreeGenerator.cs
- PersonalizationProviderHelper.cs
- AdRotator.cs
- PlaceHolder.cs
- DataTableMappingCollection.cs
- PackageFilter.cs
- GridViewAutomationPeer.cs