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
- StyleCollectionEditor.cs
- CellParagraph.cs
- ServerIdentity.cs
- TextSerializer.cs
- ItemsControl.cs
- LockingPersistenceProvider.cs
- ImageFormatConverter.cs
- Perspective.cs
- TableLayoutPanel.cs
- BindingCompleteEventArgs.cs
- AdditionalEntityFunctions.cs
- AutoGeneratedFieldProperties.cs
- TranslateTransform.cs
- ObservableCollection.cs
- CatalogPartCollection.cs
- LineInfo.cs
- InputLanguageManager.cs
- DisplayInformation.cs
- PtsHost.cs
- Serializer.cs
- FontFamilyValueSerializer.cs
- util.cs
- PerfProviderCollection.cs
- XhtmlBasicValidationSummaryAdapter.cs
- PageAsyncTask.cs
- ItemCollection.cs
- SqlRowUpdatedEvent.cs
- DefaultPropertyAttribute.cs
- ComponentChangedEvent.cs
- TextModifierScope.cs
- ObsoleteAttribute.cs
- ScriptReferenceBase.cs
- Assert.cs
- Cell.cs
- ConnectionString.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- NamedObject.cs
- WsatExtendedInformation.cs
- InstanceView.cs
- Drawing.cs
- DictionarySectionHandler.cs
- TimelineGroup.cs
- TemplateEditingVerb.cs
- PrivilegeNotHeldException.cs
- RectAnimation.cs
- RemotingServices.cs
- TransportOutputChannel.cs
- __TransparentProxy.cs
- XmlSchemaSet.cs
- IPEndPoint.cs
- COM2ColorConverter.cs
- Scripts.cs
- ColumnWidthChangedEvent.cs
- HttpResponseInternalBase.cs
- InternalPolicyElement.cs
- X509Certificate.cs
- HGlobalSafeHandle.cs
- Bezier.cs
- XmlAttributeCollection.cs
- Funcletizer.cs
- InsufficientMemoryException.cs
- SelectionEditor.cs
- IndentedWriter.cs
- GenericIdentity.cs
- WebPartsPersonalization.cs
- SmiEventSink_Default.cs
- NetCodeGroup.cs
- Nodes.cs
- ObjectTag.cs
- EntityDataSourceConfigureObjectContext.cs
- DelegateCompletionCallbackWrapper.cs
- SqlDataSourceView.cs
- WeakRefEnumerator.cs
- XmlConverter.cs
- Boolean.cs
- BamlBinaryReader.cs
- XmlTextWriter.cs
- FileCodeGroup.cs
- GenericAuthenticationEventArgs.cs
- DataTableMappingCollection.cs
- MasterPage.cs
- InvokeMethod.cs
- GridViewRowPresenter.cs
- DataServiceCollectionOfT.cs
- ZoneMembershipCondition.cs
- GridView.cs
- DragDeltaEventArgs.cs
- OutputCacheModule.cs
- CorrelationToken.cs
- RelationshipConverter.cs
- CodeAccessSecurityEngine.cs
- RangeValidator.cs
- GenericParameterDataContract.cs
- EventArgs.cs
- MouseOverProperty.cs
- PropertyEmitter.cs
- Condition.cs
- ConfigXmlCDataSection.cs
- LambdaCompiler.Unary.cs
- CompositeScriptReference.cs