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
- ProfileEventArgs.cs
- DetailsViewCommandEventArgs.cs
- StateMachineTimers.cs
- LingerOption.cs
- Point3DKeyFrameCollection.cs
- XmlDocumentFragment.cs
- DataGridSortingEventArgs.cs
- LiteralTextParser.cs
- Vector3dCollection.cs
- MediaContext.cs
- CachedTypeface.cs
- DataGridViewTextBoxEditingControl.cs
- ListViewSortEventArgs.cs
- XPathNodeIterator.cs
- TemplateManager.cs
- TableLayoutSettingsTypeConverter.cs
- EditingCommands.cs
- ProxyWebPart.cs
- NamespaceEmitter.cs
- TextComposition.cs
- connectionpool.cs
- HttpConfigurationContext.cs
- TimelineCollection.cs
- SqlConnectionStringBuilder.cs
- XPathNodeList.cs
- StylusPointPropertyInfoDefaults.cs
- LongTypeConverter.cs
- FeatureSupport.cs
- SrgsRuleRef.cs
- DbProviderFactories.cs
- ContextMenuService.cs
- SignatureDescription.cs
- ItemCollection.cs
- Filter.cs
- WebPartCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SystemShuttingDownException.cs
- Bits.cs
- Pen.cs
- EntitySqlQueryState.cs
- Glyph.cs
- PageCatalogPart.cs
- DataObjectMethodAttribute.cs
- DisableDpiAwarenessAttribute.cs
- Parser.cs
- DictationGrammar.cs
- AffineTransform3D.cs
- AlphabeticalEnumConverter.cs
- Helpers.cs
- HttpModulesSection.cs
- Transactions.cs
- SecurityUniqueId.cs
- mediaclock.cs
- Timer.cs
- SpellerError.cs
- DataGridViewTextBoxCell.cs
- EntityDataSourceDesigner.cs
- TraceUtils.cs
- TextSpan.cs
- WebHttpBinding.cs
- NonceCache.cs
- WindowsPrincipal.cs
- QilLoop.cs
- PropertyCollection.cs
- FunctionMappingTranslator.cs
- ConfigurationElement.cs
- ComboBoxRenderer.cs
- VersionValidator.cs
- AsymmetricKeyExchangeFormatter.cs
- PickDesigner.xaml.cs
- HandlerBase.cs
- TextEditorTables.cs
- BrushValueSerializer.cs
- EncryptedXml.cs
- SafeNativeMethods.cs
- GZipDecoder.cs
- listviewsubitemcollectioneditor.cs
- CodeGenerator.cs
- LineBreak.cs
- Rect3DValueSerializer.cs
- Configuration.cs
- TextAction.cs
- GotoExpression.cs
- OrderByBuilder.cs
- BinaryQueryOperator.cs
- FloaterBaseParagraph.cs
- GroupItemAutomationPeer.cs
- GridViewRow.cs
- TimeoutException.cs
- CommandBindingCollection.cs
- EntitySetBase.cs
- WebPartMovingEventArgs.cs
- PageAdapter.cs
- EnvelopedPkcs7.cs
- WhitespaceRuleLookup.cs
- DataStreams.cs
- CallContext.cs
- storepermissionattribute.cs
- AuthenticationModuleElementCollection.cs
- Int16Animation.cs