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
- TextBoxAutoCompleteSourceConverter.cs
- GenericUriParser.cs
- DateTimePicker.cs
- OrthographicCamera.cs
- EventLogRecord.cs
- MenuAutomationPeer.cs
- MenuItemCollection.cs
- XmlEnumAttribute.cs
- ThousandthOfEmRealDoubles.cs
- GenericTextProperties.cs
- SafeRightsManagementQueryHandle.cs
- SmtpMail.cs
- FontUnitConverter.cs
- PolyQuadraticBezierSegment.cs
- XmlQualifiedName.cs
- ToolStripInSituService.cs
- DrawingAttributesDefaultValueFactory.cs
- CompiledRegexRunnerFactory.cs
- SqlInternalConnection.cs
- CryptoStream.cs
- SecurityTokenAuthenticator.cs
- TrustLevelCollection.cs
- ObjectRef.cs
- CollectionChangedEventManager.cs
- XmlSchemaComplexType.cs
- DPCustomTypeDescriptor.cs
- TextEndOfParagraph.cs
- TCEAdapterGenerator.cs
- FreezableCollection.cs
- MsmqBindingElementBase.cs
- DoWorkEventArgs.cs
- DeclaredTypeElement.cs
- Pen.cs
- StateMachineExecutionState.cs
- WebReferencesBuildProvider.cs
- ClickablePoint.cs
- BaseCodePageEncoding.cs
- NGCUIElementCollectionSerializerAsync.cs
- DataBindingList.cs
- PathGeometry.cs
- DataException.cs
- ArrayConverter.cs
- TimeSpanSecondsConverter.cs
- FolderBrowserDialog.cs
- WorkflowApplicationIdleEventArgs.cs
- BindingCollection.cs
- BasicExpressionVisitor.cs
- _ServiceNameStore.cs
- ToggleProviderWrapper.cs
- GridItemPattern.cs
- selecteditemcollection.cs
- UriScheme.cs
- DrawingServices.cs
- GridViewColumnCollection.cs
- UidPropertyAttribute.cs
- ConnectionStringsSection.cs
- TypeBuilder.cs
- ParseChildrenAsPropertiesAttribute.cs
- HostedBindingBehavior.cs
- Viewport3DAutomationPeer.cs
- NumericUpDown.cs
- AllMembershipCondition.cs
- UnaryOperationBinder.cs
- HttpCachePolicy.cs
- UInt64.cs
- XmlSchemaSimpleTypeUnion.cs
- TreePrinter.cs
- ParameterModifier.cs
- HtmlTextArea.cs
- TemplateInstanceAttribute.cs
- DecimalKeyFrameCollection.cs
- AuthenticateEventArgs.cs
- DataComponentGenerator.cs
- TripleDES.cs
- RootProfilePropertySettingsCollection.cs
- BindingMAnagerBase.cs
- CodeCastExpression.cs
- remotingproxy.cs
- XmlTextReader.cs
- DBPropSet.cs
- ComUdtElement.cs
- Encoding.cs
- _Semaphore.cs
- CustomWebEventKey.cs
- HealthMonitoringSectionHelper.cs
- mil_sdk_version.cs
- complextypematerializer.cs
- AuthStoreRoleProvider.cs
- UrlPath.cs
- PropertyGeneratedEventArgs.cs
- RuleElement.cs
- GlobalizationSection.cs
- recordstate.cs
- HttpCookiesSection.cs
- OdbcParameterCollection.cs
- CharacterBuffer.cs
- PolyLineSegment.cs
- GridViewSelectEventArgs.cs
- SafeLibraryHandle.cs
- XmlArrayAttribute.cs