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
- SymmetricSecurityProtocol.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ExpressionConverter.cs
- WebPartZone.cs
- WpfPayload.cs
- Parser.cs
- EventWaitHandleSecurity.cs
- SourceLocationProvider.cs
- RawKeyboardInputReport.cs
- Missing.cs
- FlowNode.cs
- BamlWriter.cs
- CultureInfo.cs
- CopyAction.cs
- DetailsViewDesigner.cs
- BinaryWriter.cs
- TagMapInfo.cs
- AliasedSlot.cs
- Exceptions.cs
- QueryOutputWriterV1.cs
- TcpChannelFactory.cs
- NameHandler.cs
- TemplateControlCodeDomTreeGenerator.cs
- TypeForwardedToAttribute.cs
- Resources.Designer.cs
- AnimationException.cs
- EntityContainerAssociationSet.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- SessionIDManager.cs
- SqlGenericUtil.cs
- References.cs
- DependencySource.cs
- XmlSchemaSubstitutionGroup.cs
- InternalConfigSettingsFactory.cs
- ItemCheckedEvent.cs
- RuleSetDialog.Designer.cs
- PropertyRef.cs
- AnimationTimeline.cs
- GridItemCollection.cs
- MetadataCollection.cs
- Ticks.cs
- CodeAttachEventStatement.cs
- HwndMouseInputProvider.cs
- PropertyMapper.cs
- VectorCollection.cs
- TextElementCollection.cs
- TrustSection.cs
- Win32SafeHandles.cs
- TextAutomationPeer.cs
- XslNumber.cs
- UpdateProgress.cs
- TextRangeEditLists.cs
- TreeNodeBindingCollection.cs
- PrinterUnitConvert.cs
- HostingEnvironment.cs
- Tuple.cs
- ConfigXmlSignificantWhitespace.cs
- FixedSOMLineRanges.cs
- webproxy.cs
- HMACRIPEMD160.cs
- FilterQueryOptionExpression.cs
- TransformDescriptor.cs
- PathTooLongException.cs
- SHA384.cs
- NetPipeSection.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- SqlPersonalizationProvider.cs
- Rectangle.cs
- ColumnReorderedEventArgs.cs
- FreezableOperations.cs
- AuthenticatedStream.cs
- ClientOptions.cs
- PageContent.cs
- KeyValueConfigurationCollection.cs
- x509store.cs
- PolicyLevel.cs
- LabelEditEvent.cs
- ColumnTypeConverter.cs
- RichTextBoxAutomationPeer.cs
- BitmapDownload.cs
- FtpRequestCacheValidator.cs
- FileIOPermission.cs
- DocumentSchemaValidator.cs
- CompletionBookmark.cs
- AsyncOperation.cs
- ListView.cs
- WebPartEventArgs.cs
- BehaviorDragDropEventArgs.cs
- PenLineCapValidation.cs
- AnnotationAuthorChangedEventArgs.cs
- StructuralObject.cs
- CommandField.cs
- SessionParameter.cs
- IPipelineRuntime.cs
- BitmapInitialize.cs
- FixedHyperLink.cs
- TransformerInfo.cs
- SqlUdtInfo.cs
- DataPagerFieldItem.cs
- PassportAuthentication.cs