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
- HandledMouseEvent.cs
- ImplicitInputBrush.cs
- CrossAppDomainChannel.cs
- TypeConverterValueSerializer.cs
- TypeDescriptionProviderAttribute.cs
- BamlLocalizer.cs
- UseLicense.cs
- StateElement.cs
- UnSafeCharBuffer.cs
- CompiledRegexRunner.cs
- ExceptionHandler.cs
- MetadataAssemblyHelper.cs
- RemoteWebConfigurationHost.cs
- FloatAverageAggregationOperator.cs
- XmlNamedNodeMap.cs
- HtmlTernaryTree.cs
- Attributes.cs
- DataGridViewButtonColumn.cs
- RecognitionResult.cs
- CmsInterop.cs
- HijriCalendar.cs
- NotifyInputEventArgs.cs
- ScriptRegistrationManager.cs
- XmlBinaryReader.cs
- Transform3D.cs
- AnimationLayer.cs
- AdapterUtil.cs
- TextLine.cs
- IIS7UserPrincipal.cs
- NativeMethods.cs
- HasCopySemanticsAttribute.cs
- LongCountAggregationOperator.cs
- ClosureBinding.cs
- AttributeCallbackBuilder.cs
- WindowsRichEditRange.cs
- Literal.cs
- QueryOpeningEnumerator.cs
- Substitution.cs
- StickyNoteContentControl.cs
- InputScope.cs
- NewArrayExpression.cs
- Library.cs
- ClientFormsAuthenticationCredentials.cs
- SizeChangedEventArgs.cs
- BindableTemplateBuilder.cs
- WorkflowPageSetupDialog.cs
- UIPermission.cs
- MatrixAnimationUsingKeyFrames.cs
- Walker.cs
- DataServiceQueryException.cs
- TimeSpanStorage.cs
- NullRuntimeConfig.cs
- TableParagraph.cs
- ConcurrencyMode.cs
- PrinterSettings.cs
- XmlAggregates.cs
- ExtensionFile.cs
- SqlXml.cs
- MetricEntry.cs
- HashCodeCombiner.cs
- _SingleItemRequestCache.cs
- ClientBuildManager.cs
- SynchronizationLockException.cs
- CalendarDay.cs
- BezierSegment.cs
- securestring.cs
- MyContact.cs
- UserControlCodeDomTreeGenerator.cs
- FormViewPagerRow.cs
- PhonemeEventArgs.cs
- ComponentFactoryHelpers.cs
- ServiceAppDomainAssociationProvider.cs
- DependencyStoreSurrogate.cs
- __ComObject.cs
- DeadCharTextComposition.cs
- MouseEventArgs.cs
- FixUp.cs
- ZipIOExtraField.cs
- IIS7UserPrincipal.cs
- ResolveNameEventArgs.cs
- HttpListenerPrefixCollection.cs
- Oid.cs
- DataSourceSelectArguments.cs
- DefaultProxySection.cs
- WebPartDisplayMode.cs
- Rotation3D.cs
- DispatcherHooks.cs
- ObjectConverter.cs
- DataGridLinkButton.cs
- ScriptReference.cs
- HealthMonitoringSection.cs
- Canvas.cs
- DataServiceProcessingPipelineEventArgs.cs
- AdornerHitTestResult.cs
- HttpListener.cs
- CodeEntryPointMethod.cs
- Vars.cs
- DictionaryEntry.cs
- dbenumerator.cs
- NaturalLanguageHyphenator.cs