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
- UnSafeCharBuffer.cs
- Scene3D.cs
- ChangeToolStripParentVerb.cs
- SR.cs
- ScrollViewerAutomationPeer.cs
- InteropAutomationProvider.cs
- WebPartEditorApplyVerb.cs
- BitStack.cs
- EncoderExceptionFallback.cs
- NativeMethods.cs
- SystemWebExtensionsSectionGroup.cs
- AsymmetricSignatureDeformatter.cs
- Helpers.cs
- DataGridViewImageCell.cs
- FileDialog_Vista_Interop.cs
- DebugController.cs
- PhysicalAddress.cs
- UInt64Storage.cs
- DataGridColumnCollection.cs
- MaterializeFromAtom.cs
- Mappings.cs
- ServiceReference.cs
- HtmlToClrEventProxy.cs
- EventMetadata.cs
- XPathAncestorIterator.cs
- RegisteredDisposeScript.cs
- XmlBinaryReaderSession.cs
- PropagatorResult.cs
- CommandValueSerializer.cs
- ResourceManagerWrapper.cs
- ConstraintCollection.cs
- BitmapEffectDrawing.cs
- StringBuilder.cs
- SerTrace.cs
- CatalogZone.cs
- AttachedPropertyBrowsableAttribute.cs
- XmlEncoding.cs
- XmlMembersMapping.cs
- Authorization.cs
- TreeNodeMouseHoverEvent.cs
- Wildcard.cs
- TypeTypeConverter.cs
- Soap12ProtocolReflector.cs
- SqlCharStream.cs
- DecoderFallback.cs
- IntSecurity.cs
- ValidationError.cs
- Roles.cs
- BitStream.cs
- ResourceAttributes.cs
- Mapping.cs
- InertiaTranslationBehavior.cs
- ImageIndexConverter.cs
- AuthenticationServiceManager.cs
- DescendantQuery.cs
- FtpWebResponse.cs
- safex509handles.cs
- ConnectionProviderAttribute.cs
- Pkcs7Recipient.cs
- SafeNativeMethods.cs
- EntityDataSourceSelectedEventArgs.cs
- AutoGeneratedFieldProperties.cs
- PropertySegmentSerializationProvider.cs
- EntityDataSourceColumn.cs
- CodeGeneratorOptions.cs
- CapabilitiesState.cs
- TextEndOfParagraph.cs
- DynamicPropertyHolder.cs
- RSACryptoServiceProvider.cs
- DataFieldEditor.cs
- SortedSet.cs
- CopyOfAction.cs
- ErrorTableItemStyle.cs
- CustomValidator.cs
- SignatureToken.cs
- AspNetSynchronizationContext.cs
- RenamedEventArgs.cs
- ActiveDocumentEvent.cs
- MembershipPasswordException.cs
- TextWriter.cs
- DebugView.cs
- TextEditorTyping.cs
- InputLangChangeRequestEvent.cs
- AnonymousIdentificationSection.cs
- ObservableDictionary.cs
- XmlAttributeOverrides.cs
- SubqueryRules.cs
- CredentialCache.cs
- StyleXamlParser.cs
- BamlRecords.cs
- DataColumnMappingCollection.cs
- ReadOnlyHierarchicalDataSourceView.cs
- RequestQueue.cs
- BindStream.cs
- LocatorBase.cs
- TextShapeableCharacters.cs
- RectAnimation.cs
- BamlRecordHelper.cs
- SpAudioStreamWrapper.cs
- ParameterEditorUserControl.cs