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
- ClientCultureInfo.cs
- AnnotationHelper.cs
- CompositeCollection.cs
- ParenthesizePropertyNameAttribute.cs
- ScriptControl.cs
- Stroke2.cs
- Model3D.cs
- ChannelManagerHelpers.cs
- DataChangedEventManager.cs
- NameValueConfigurationCollection.cs
- SelectionUIService.cs
- XmlExtensionFunction.cs
- TextFormatterHost.cs
- PageContent.cs
- WinFormsSpinner.cs
- EncryptedReference.cs
- ScriptControlDescriptor.cs
- BaseCollection.cs
- ParameterBuilder.cs
- NonClientArea.cs
- ListViewDeleteEventArgs.cs
- DefaultAuthorizationContext.cs
- SelectionWordBreaker.cs
- TimeEnumHelper.cs
- ValueCollectionParameterReader.cs
- FreezableCollection.cs
- SqlDataReaderSmi.cs
- TemplateField.cs
- FixedSOMPageElement.cs
- DbExpressionRules.cs
- PointCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- AccessorTable.cs
- PathGeometry.cs
- PolicyLevel.cs
- WizardForm.cs
- TrustLevel.cs
- HtmlTable.cs
- PreservationFileWriter.cs
- XamlPoint3DCollectionSerializer.cs
- Inline.cs
- OletxTransactionManager.cs
- FixedFlowMap.cs
- NaturalLanguageHyphenator.cs
- ImportContext.cs
- BaseParser.cs
- DesignerToolboxInfo.cs
- InstanceData.cs
- ASCIIEncoding.cs
- FloaterParaClient.cs
- ContractReference.cs
- MetadataItemCollectionFactory.cs
- PathNode.cs
- DetailsViewInsertedEventArgs.cs
- WindowsEditBoxRange.cs
- PopupRoot.cs
- DataGridPageChangedEventArgs.cs
- TextSelectionHighlightLayer.cs
- odbcmetadatafactory.cs
- ToolboxControl.cs
- Module.cs
- KnownBoxes.cs
- Win32MouseDevice.cs
- ExpandedWrapper.cs
- ADRole.cs
- Label.cs
- DataGridTextBoxColumn.cs
- TraceSection.cs
- IteratorDescriptor.cs
- HttpCapabilitiesEvaluator.cs
- LoginUtil.cs
- MarkerProperties.cs
- EntityType.cs
- ProfilePropertySettingsCollection.cs
- Attributes.cs
- EndpointPerformanceCounters.cs
- TableCellAutomationPeer.cs
- BasicAsyncResult.cs
- SecurityTokenProvider.cs
- DialogBaseForm.cs
- sitestring.cs
- TargetInvocationException.cs
- CacheMemory.cs
- ComplexType.cs
- TargetFrameworkUtil.cs
- RoutedPropertyChangedEventArgs.cs
- EntityDataSourceViewSchema.cs
- CheckBoxBaseAdapter.cs
- VarRefManager.cs
- SQLDateTimeStorage.cs
- BaseWebProxyFinder.cs
- EditorServiceContext.cs
- AllMembershipCondition.cs
- CatalogZoneBase.cs
- HtmlUtf8RawTextWriter.cs
- LockedAssemblyCache.cs
- ZipIOExtraFieldZip64Element.cs
- SizeConverter.cs
- SqlProfileProvider.cs
- SHA1CryptoServiceProvider.cs