Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Common / NameValuePair.cs / 1305376 / 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
- _DisconnectOverlappedAsyncResult.cs
- ToolStripProgressBar.cs
- NamedObject.cs
- VisualBrush.cs
- InputMethod.cs
- RemotingServices.cs
- CurrencyWrapper.cs
- IdleTimeoutMonitor.cs
- CodeThrowExceptionStatement.cs
- DependencyPropertyDescriptor.cs
- DefaultProfileManager.cs
- MultiBindingExpression.cs
- HiddenField.cs
- MimeTypeMapper.cs
- MissingSatelliteAssemblyException.cs
- InputScopeNameConverter.cs
- AffineTransform3D.cs
- SafeNativeMethods.cs
- ServiceModelSecurityTokenRequirement.cs
- ButtonFlatAdapter.cs
- ContentFileHelper.cs
- EmptyReadOnlyDictionaryInternal.cs
- InputBuffer.cs
- Stacktrace.cs
- MessageHeaderAttribute.cs
- MeshGeometry3D.cs
- MethodBody.cs
- HtmlElementEventArgs.cs
- XsdCachingReader.cs
- SplineKeyFrames.cs
- KnownColorTable.cs
- StorageFunctionMapping.cs
- InputLanguageEventArgs.cs
- BitmapSourceSafeMILHandle.cs
- ParsedAttributeCollection.cs
- FormattedText.cs
- RijndaelManagedTransform.cs
- ErrorFormatterPage.cs
- Color.cs
- DateTimeOffset.cs
- NeutralResourcesLanguageAttribute.cs
- DataRelation.cs
- FileAuthorizationModule.cs
- SupportingTokenAuthenticatorSpecification.cs
- BrowserCapabilitiesCodeGenerator.cs
- UriParserTemplates.cs
- NonBatchDirectoryCompiler.cs
- UpdateRecord.cs
- JsonServiceDocumentSerializer.cs
- BitmapScalingModeValidation.cs
- Debug.cs
- SequenceDesigner.xaml.cs
- ProfileWorkflowElement.cs
- DataBoundControlActionList.cs
- DesignerProperties.cs
- MenuItemStyle.cs
- CacheAxisQuery.cs
- TagNameToTypeMapper.cs
- CssClassPropertyAttribute.cs
- HttpPostedFile.cs
- StatusBarPanel.cs
- Stopwatch.cs
- EpmTargetTree.cs
- DataServiceProviderMethods.cs
- EncoderParameters.cs
- Configuration.cs
- Message.cs
- HttpEncoderUtility.cs
- MouseDevice.cs
- DataStorage.cs
- TdsParserHelperClasses.cs
- CompiledRegexRunner.cs
- MarginCollapsingState.cs
- SocketAddress.cs
- BaseDataList.cs
- DynamicPropertyHolder.cs
- MetadataItemSerializer.cs
- ReferentialConstraint.cs
- PropertyMetadata.cs
- PowerStatus.cs
- SimpleModelProvider.cs
- CollectionChangedEventManager.cs
- Odbc32.cs
- CompositeDesignerAccessibleObject.cs
- SafeRightsManagementSessionHandle.cs
- SchemaInfo.cs
- CompatibleIComparer.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SystemDiagnosticsSection.cs
- X509SecurityTokenProvider.cs
- ScriptingAuthenticationServiceSection.cs
- DesignerActionMethodItem.cs
- ListMarkerLine.cs
- MobileTemplatedControlDesigner.cs
- RsaKeyIdentifierClause.cs
- DataGridViewComboBoxCell.cs
- Rule.cs
- EntityAdapter.cs
- PropagationProtocolsTracing.cs