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
- IProducerConsumerCollection.cs
- MsmqBindingElementBase.cs
- AsyncCodeActivityContext.cs
- ArraySubsetEnumerator.cs
- unsafeIndexingFilterStream.cs
- ProfileInfo.cs
- DocumentSequenceHighlightLayer.cs
- NetCodeGroup.cs
- Button.cs
- GridEntry.cs
- OleDbPermission.cs
- PrePostDescendentsWalker.cs
- ServiceChannelManager.cs
- Point3D.cs
- DataServiceException.cs
- ExtensionFile.cs
- IPipelineRuntime.cs
- FloaterParagraph.cs
- Point4D.cs
- BaseValidator.cs
- CodeValidator.cs
- Effect.cs
- SequenceRange.cs
- Span.cs
- PageDeviceFont.cs
- SqlClientWrapperSmiStreamChars.cs
- COM2Properties.cs
- ParallelEnumerable.cs
- DefaultTextStore.cs
- ExecutionEngineException.cs
- AsymmetricKeyExchangeDeformatter.cs
- ToolCreatedEventArgs.cs
- COM2PropertyBuilderUITypeEditor.cs
- UnhandledExceptionEventArgs.cs
- SqlMethods.cs
- PublishLicense.cs
- RepeatInfo.cs
- ToolBarOverflowPanel.cs
- LogicalExpr.cs
- ColorConverter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ColorInterpolationModeValidation.cs
- AttributeUsageAttribute.cs
- DataGridViewIntLinkedList.cs
- ExpandSegmentCollection.cs
- InvalidPrinterException.cs
- IncrementalCompileAnalyzer.cs
- AutomationPatternInfo.cs
- printdlgexmarshaler.cs
- unsafeIndexingFilterStream.cs
- MailAddress.cs
- StringCollection.cs
- DecoderBestFitFallback.cs
- SelectiveScrollingGrid.cs
- mediaclock.cs
- SerializationInfo.cs
- WebPartConnection.cs
- TracePayload.cs
- LambdaCompiler.ControlFlow.cs
- BoolExpression.cs
- CipherData.cs
- ProxyWebPartManager.cs
- SafeNativeMethodsOther.cs
- IDQuery.cs
- SafeViewOfFileHandle.cs
- ValidationResult.cs
- codemethodreferenceexpression.cs
- HtmlInputControl.cs
- CodeMemberEvent.cs
- DataBoundControlAdapter.cs
- CompositeScriptReference.cs
- SpAudioStreamWrapper.cs
- ManagedWndProcTracker.cs
- StrongNameKeyPair.cs
- AnimationClock.cs
- PhonemeEventArgs.cs
- ScrollChangedEventArgs.cs
- BorderSidesEditor.cs
- AtomMaterializerLog.cs
- TextElement.cs
- WebControlAdapter.cs
- WebPartCatalogAddVerb.cs
- Material.cs
- NativeMethods.cs
- DataGridViewComboBoxEditingControl.cs
- XPathBinder.cs
- ViewgenContext.cs
- GroupBoxRenderer.cs
- SiteMapDataSourceView.cs
- XmlNodeWriter.cs
- GenerateTemporaryTargetAssembly.cs
- Odbc32.cs
- SqlException.cs
- BitmapMetadataEnumerator.cs
- WindowsRegion.cs
- XmlILStorageConverter.cs
- PassportAuthenticationEventArgs.cs
- DefaultSection.cs
- TypeBrowser.xaml.cs
- Zone.cs