Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- OdbcDataReader.cs
- Menu.cs
- RijndaelManaged.cs
- TriggerBase.cs
- VectorValueSerializer.cs
- CodeTypeMemberCollection.cs
- EncryptedKey.cs
- SQLSingle.cs
- BindingNavigator.cs
- XmlArrayItemAttribute.cs
- BrowserCapabilitiesFactoryBase.cs
- CssStyleCollection.cs
- WebPartConnectionsCancelEventArgs.cs
- ResourceExpressionBuilder.cs
- SingleAnimationBase.cs
- LinearGradientBrush.cs
- FilteredDataSetHelper.cs
- DigestTraceRecordHelper.cs
- WebConfigurationHostFileChange.cs
- InputLangChangeEvent.cs
- SQLConvert.cs
- CompiledRegexRunner.cs
- CallId.cs
- ImageMap.cs
- SchemaDeclBase.cs
- RenderingBiasValidation.cs
- ListParagraph.cs
- SQLRoleProvider.cs
- HybridObjectCache.cs
- PermissionSetTriple.cs
- Duration.cs
- ScriptControl.cs
- XmlElementAttributes.cs
- TcpConnectionPoolSettingsElement.cs
- GridViewUpdateEventArgs.cs
- EntityDataSourceMemberPath.cs
- OpenFileDialog.cs
- BrowserInteropHelper.cs
- BitmapEffectDrawing.cs
- EmptyStringExpandableObjectConverter.cs
- WpfSharedBamlSchemaContext.cs
- Enum.cs
- WorkingDirectoryEditor.cs
- ping.cs
- DataGridSortCommandEventArgs.cs
- PeerNameRecordCollection.cs
- TargetException.cs
- HatchBrush.cs
- Journaling.cs
- ExtractedStateEntry.cs
- CodeExporter.cs
- SqlPersonalizationProvider.cs
- OpenCollectionAsyncResult.cs
- NotifyIcon.cs
- StateManagedCollection.cs
- CommonDialog.cs
- WaitHandle.cs
- ZipIOBlockManager.cs
- PriorityBinding.cs
- TabControlDesigner.cs
- ConnectionStringsSection.cs
- ComplexPropertyEntry.cs
- XPathBuilder.cs
- BitmapSourceSafeMILHandle.cs
- WebPartEditorCancelVerb.cs
- FloaterParaClient.cs
- SqlDataSourceEnumerator.cs
- VisualStyleTypesAndProperties.cs
- ProfileParameter.cs
- PointConverter.cs
- TableDetailsRow.cs
- WebPageTraceListener.cs
- SoapTypeAttribute.cs
- WebPartMenu.cs
- StringInfo.cs
- UnmanagedMemoryStream.cs
- DescriptionAttribute.cs
- FontUnit.cs
- GraphicsState.cs
- FormsAuthentication.cs
- LocalFileSettingsProvider.cs
- ToolStripItemDataObject.cs
- ReplacementText.cs
- dtdvalidator.cs
- InstallHelper.cs
- DataGridViewButtonCell.cs
- StringSorter.cs
- UniqueIdentifierService.cs
- SerializableAttribute.cs
- RegisterResponseInfo.cs
- DataRow.cs
- UserControlDesigner.cs
- WriteTimeStream.cs
- ProcessModuleCollection.cs
- HtmlTitle.cs
- Line.cs
- DefaultDialogButtons.cs
- Console.cs
- TreeNodeStyle.cs
- ToolStripContentPanel.cs