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
- ProxyGenerator.cs
- PageStatePersister.cs
- _LazyAsyncResult.cs
- TreeView.cs
- PointAnimationUsingPath.cs
- InputElement.cs
- RunWorkerCompletedEventArgs.cs
- DateTimeOffsetStorage.cs
- FieldNameLookup.cs
- ListBase.cs
- WindowHideOrCloseTracker.cs
- InputProcessorProfiles.cs
- CoreSwitches.cs
- ContainerVisual.cs
- CodeConditionStatement.cs
- WebPartExportVerb.cs
- AnnotationService.cs
- InstanceHandleConflictException.cs
- C14NUtil.cs
- WizardForm.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- _FtpDataStream.cs
- ModifierKeysValueSerializer.cs
- TemplateColumn.cs
- TypeExtensionSerializer.cs
- XmlReaderDelegator.cs
- HttpListenerException.cs
- InvalidFilterCriteriaException.cs
- DbTransaction.cs
- HtmlInputCheckBox.cs
- MultipartContentParser.cs
- SettingsAttributes.cs
- SqlDataSourceParameterParser.cs
- ExpandButtonVisibilityConverter.cs
- DataGridViewRowCollection.cs
- InkSerializer.cs
- SqlDataReaderSmi.cs
- DataGridLength.cs
- SemaphoreFullException.cs
- ItemsChangedEventArgs.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Select.cs
- TypeUnloadedException.cs
- AutomationPatternInfo.cs
- ResourceReferenceExpression.cs
- Propagator.Evaluator.cs
- RequestTimeoutManager.cs
- RuntimeHandles.cs
- SimpleExpression.cs
- SafeFileHandle.cs
- ConfigXmlElement.cs
- SystemTcpConnection.cs
- DataGridViewCellParsingEventArgs.cs
- QilScopedVisitor.cs
- ActivityLocationReferenceEnvironment.cs
- OleDbPropertySetGuid.cs
- RawStylusInputCustomData.cs
- MemberPath.cs
- StringResourceManager.cs
- LinearKeyFrames.cs
- NotEqual.cs
- ApplicationException.cs
- WinEventQueueItem.cs
- MappingModelBuildProvider.cs
- _HTTPDateParse.cs
- loginstatus.cs
- ExtensionFile.cs
- SafeFileMappingHandle.cs
- TaiwanCalendar.cs
- SafePEFileHandle.cs
- VectorConverter.cs
- DrawingBrush.cs
- cookieexception.cs
- BoundingRectTracker.cs
- RawAppCommandInputReport.cs
- RegisteredExpandoAttribute.cs
- EventProviderTraceListener.cs
- TransactionScope.cs
- EncryptedReference.cs
- AsmxEndpointPickerExtension.cs
- PointLightBase.cs
- InputLanguageManager.cs
- Italic.cs
- KeyEventArgs.cs
- ProviderConnectionPoint.cs
- XsdBuilder.cs
- MobileControlPersister.cs
- MediaContext.cs
- WebConfigurationHostFileChange.cs
- TextEditorParagraphs.cs
- RadioButtonList.cs
- IteratorFilter.cs
- TagPrefixCollection.cs
- ServiceDescriptionSerializer.cs
- NameScope.cs
- ResourceKey.cs
- CodePropertyReferenceExpression.cs
- RecognizedAudio.cs
- PropertySegmentSerializer.cs
- QueryParameter.cs