Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PasswordTextNavigator.cs
- FileDialogPermission.cs
- MsmqTransportElement.cs
- AssociationProvider.cs
- ReadOnlyHierarchicalDataSource.cs
- MissingMemberException.cs
- TextContainerHelper.cs
- RuleRef.cs
- PropertyDescriptorGridEntry.cs
- StandardToolWindows.cs
- Baml6ConstructorInfo.cs
- CommonBehaviorsSection.cs
- TableRowCollection.cs
- ToolConsole.cs
- MetadataUtil.cs
- CompModSwitches.cs
- CheckBoxPopupAdapter.cs
- Vector.cs
- XmlAttributeAttribute.cs
- OdbcConnectionFactory.cs
- EventListenerClientSide.cs
- MarginCollapsingState.cs
- ThreadInterruptedException.cs
- SendKeys.cs
- WebBrowserBase.cs
- StringDictionaryEditor.cs
- ResolveNameEventArgs.cs
- ComboBox.cs
- EventlogProvider.cs
- XamlWriter.cs
- Geometry.cs
- SyndicationDeserializer.cs
- QueryParameter.cs
- HandleRef.cs
- RenderData.cs
- ArgumentNullException.cs
- ViewGenResults.cs
- DurableInstanceManager.cs
- OutputWindow.cs
- CodeLinePragma.cs
- AppDomainFactory.cs
- ActivityBindForm.Designer.cs
- XpsImageSerializationService.cs
- StrongNameMembershipCondition.cs
- ExecutionContext.cs
- GetPageNumberCompletedEventArgs.cs
- ConstNode.cs
- WebPartZoneBase.cs
- FormViewInsertedEventArgs.cs
- FacetChecker.cs
- ButtonBase.cs
- SizeConverter.cs
- ConfigurationSettings.cs
- XhtmlBasicSelectionListAdapter.cs
- BatchWriter.cs
- PlainXmlSerializer.cs
- PersonalizationAdministration.cs
- ColumnHeaderCollectionEditor.cs
- ArrayHelper.cs
- BitmapEffectState.cs
- ThemeableAttribute.cs
- RoutedEventArgs.cs
- HttpListener.cs
- MembershipUser.cs
- TimeSpanParse.cs
- RecordConverter.cs
- DetailsViewModeEventArgs.cs
- WindowsListViewSubItem.cs
- Missing.cs
- InvalidDataException.cs
- CryptographicAttribute.cs
- DateTimeParse.cs
- SignalGate.cs
- Vector3DCollectionConverter.cs
- ContainerControl.cs
- ISessionStateStore.cs
- HandlerMappingMemo.cs
- PropertyConverter.cs
- CompositeDispatchFormatter.cs
- NumericPagerField.cs
- StandardBindingCollectionElement.cs
- ScrollPattern.cs
- TextTreeRootTextBlock.cs
- WasHostedComPlusFactory.cs
- ResourceWriter.cs
- MediaElement.cs
- LinqMaximalSubtreeNominator.cs
- DispatcherFrame.cs
- NetworkInformationPermission.cs
- FontDifferentiator.cs
- InvalidOperationException.cs
- WindowsTab.cs
- QueueProcessor.cs
- CodeVariableDeclarationStatement.cs
- DefaultAssemblyResolver.cs
- AccessViolationException.cs
- IndentedWriter.cs
- SequentialWorkflowHeaderFooter.cs
- SignHashRequest.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs