Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataGridViewCellCollection.cs
- Pair.cs
- ArgumentException.cs
- SelectionProcessor.cs
- IItemContainerGenerator.cs
- xsdvalidator.cs
- FixedPageProcessor.cs
- Stylus.cs
- CoTaskMemUnicodeSafeHandle.cs
- HttpException.cs
- TraceSource.cs
- LinqDataSourceContextEventArgs.cs
- WebPartManager.cs
- ThaiBuddhistCalendar.cs
- SessionSwitchEventArgs.cs
- Encoder.cs
- EditCommandColumn.cs
- TextSyndicationContentKindHelper.cs
- PackagePart.cs
- WebPartTransformer.cs
- EncoderReplacementFallback.cs
- RouteParser.cs
- BulletChrome.cs
- AnimationLayer.cs
- ToolStripContentPanelRenderEventArgs.cs
- x509utils.cs
- NestPullup.cs
- BridgeDataRecord.cs
- XmlEntity.cs
- Expressions.cs
- XslException.cs
- WindowsStreamSecurityElement.cs
- LinearKeyFrames.cs
- CallbackHandler.cs
- HtmlTextArea.cs
- SharedHttpsTransportManager.cs
- MethodCallTranslator.cs
- PeerInvitationResponse.cs
- MethodRental.cs
- ArraySet.cs
- XmlCountingReader.cs
- AstTree.cs
- Bits.cs
- XmlUnspecifiedAttribute.cs
- PropertyFilterAttribute.cs
- RelatedImageListAttribute.cs
- VerificationAttribute.cs
- RecordBuilder.cs
- SerializerDescriptor.cs
- OleAutBinder.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- DocumentApplicationJournalEntry.cs
- RadioButton.cs
- PickBranch.cs
- StringSource.cs
- MaterializeFromAtom.cs
- pingexception.cs
- RectKeyFrameCollection.cs
- DrawingGroup.cs
- PropertyManager.cs
- BinaryUtilClasses.cs
- sqlpipe.cs
- ColorMatrix.cs
- GACIdentityPermission.cs
- ImportException.cs
- NonClientArea.cs
- ArgumentNullException.cs
- BindingEntityInfo.cs
- ClientType.cs
- WindowsContainer.cs
- ToolStripStatusLabel.cs
- LinkDescriptor.cs
- Pkcs9Attribute.cs
- AnnotationResourceCollection.cs
- InstanceLockedException.cs
- Logging.cs
- SolidColorBrush.cs
- DesignerForm.cs
- MutexSecurity.cs
- DemultiplexingDispatchMessageFormatter.cs
- PrinterUnitConvert.cs
- HtmlTitle.cs
- Variable.cs
- regiisutil.cs
- LabelExpression.cs
- InstalledFontCollection.cs
- AliasGenerator.cs
- MembershipPasswordException.cs
- ImagingCache.cs
- ChtmlCalendarAdapter.cs
- UnsupportedPolicyOptionsException.cs
- FrameworkRichTextComposition.cs
- SimpleBitVector32.cs
- ValuePattern.cs
- KeyEvent.cs
- DataSourceProvider.cs
- WebPartZone.cs
- SecurityTokenResolver.cs
- LinkClickEvent.cs
- WorkflowApplicationAbortedEventArgs.cs