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
- DockingAttribute.cs
- RadioButtonRenderer.cs
- DeclaredTypeValidatorAttribute.cs
- ServicePoint.cs
- FillRuleValidation.cs
- BindingList.cs
- XmlNavigatorFilter.cs
- AtomicFile.cs
- NumericUpDownAcceleration.cs
- IsolatedStorageException.cs
- Trace.cs
- Error.cs
- TrustLevel.cs
- FlowDocumentFormatter.cs
- CannotUnloadAppDomainException.cs
- ArcSegment.cs
- UpdateTranslator.cs
- WebPartEditorCancelVerb.cs
- LogicalTreeHelper.cs
- PrinterResolution.cs
- EdmSchemaError.cs
- SmtpNtlmAuthenticationModule.cs
- GeneralTransform3DTo2D.cs
- DocumentViewerBaseAutomationPeer.cs
- DataSourceNameHandler.cs
- ConnectionStringSettings.cs
- WindowsIdentity.cs
- EventWaitHandleSecurity.cs
- SettingsPropertyCollection.cs
- InstancePersistenceCommand.cs
- WindowsComboBox.cs
- Rect.cs
- AnnotationObservableCollection.cs
- StatusBarDrawItemEvent.cs
- PointKeyFrameCollection.cs
- AdditionalEntityFunctions.cs
- BinaryUtilClasses.cs
- DataGridViewBand.cs
- PhysicalFontFamily.cs
- GZipDecoder.cs
- CodeTypeMemberCollection.cs
- ListView.cs
- XamlParser.cs
- SchemaDeclBase.cs
- BitVector32.cs
- FormsIdentity.cs
- DSACryptoServiceProvider.cs
- ClassHandlersStore.cs
- PropertyManager.cs
- RelatedView.cs
- DBAsyncResult.cs
- EncodingInfo.cs
- PasswordValidationException.cs
- newinstructionaction.cs
- DiscoveryOperationContext.cs
- DataSourceControlBuilder.cs
- DefaultEventAttribute.cs
- MarkupProperty.cs
- CodeLabeledStatement.cs
- Rect3DConverter.cs
- UnsafeNativeMethods.cs
- TextElementEditingBehaviorAttribute.cs
- Mapping.cs
- SQLInt16Storage.cs
- SchemaCollectionCompiler.cs
- isolationinterop.cs
- MDIClient.cs
- XmlReaderSettings.cs
- SystemResourceHost.cs
- DbParameterCollectionHelper.cs
- WindowsFormsHostAutomationPeer.cs
- LoginName.cs
- PolyQuadraticBezierSegment.cs
- WebPart.cs
- PasswordDeriveBytes.cs
- FrameworkElementFactory.cs
- AssemblyBuilder.cs
- JsonStringDataContract.cs
- TextRunTypographyProperties.cs
- sqlcontext.cs
- XslCompiledTransform.cs
- DbMetaDataColumnNames.cs
- IISMapPath.cs
- LeafCellTreeNode.cs
- SqlConnectionHelper.cs
- XmlSortKey.cs
- WCFBuildProvider.cs
- BitmapImage.cs
- EntityClassGenerator.cs
- PersonalizationProvider.cs
- ConstantSlot.cs
- BuildProvider.cs
- UniqueCodeIdentifierScope.cs
- FormsAuthenticationUser.cs
- IPEndPoint.cs
- PoisonMessageException.cs
- SchemaElement.cs
- FormClosedEvent.cs
- ClientSettings.cs
- IssuanceLicense.cs