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
- MarshalDirectiveException.cs
- ExpressionConverter.cs
- ProviderSettings.cs
- XmlImplementation.cs
- GeneralTransform3DGroup.cs
- DataGridViewCellValidatingEventArgs.cs
- PropertyInformation.cs
- SessionStateUtil.cs
- FrameworkObject.cs
- XmlAttributeAttribute.cs
- DbTypeMap.cs
- OptimisticConcurrencyException.cs
- ZipIOBlockManager.cs
- DBDataPermissionAttribute.cs
- IIS7UserPrincipal.cs
- CommittableTransaction.cs
- ViewBox.cs
- COSERVERINFO.cs
- NotSupportedException.cs
- FrugalMap.cs
- IsolatedStorageFileStream.cs
- CngKey.cs
- CodeIndexerExpression.cs
- ParserStreamGeometryContext.cs
- SQLInt32.cs
- RadioButtonPopupAdapter.cs
- ParameterBuilder.cs
- SqlDataSourceParameterParser.cs
- _AutoWebProxyScriptHelper.cs
- InlineCategoriesDocument.cs
- Utils.cs
- IMembershipProvider.cs
- GeometryConverter.cs
- Debug.cs
- StreamingContext.cs
- EntitySetBaseCollection.cs
- TabPage.cs
- NamespaceMapping.cs
- PrincipalPermission.cs
- ToolStripItem.cs
- BindingCollection.cs
- HttpDictionary.cs
- XPathQilFactory.cs
- DrawingGroupDrawingContext.cs
- _HeaderInfo.cs
- SqlConnectionString.cs
- CommonRemoteMemoryBlock.cs
- FocusManager.cs
- DataGridViewDesigner.cs
- EdmSchemaAttribute.cs
- ScriptReference.cs
- SRef.cs
- ChildDocumentBlock.cs
- ObjectItemLoadingSessionData.cs
- PassportPrincipal.cs
- SharedUtils.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ReadOnlyPropertyMetadata.cs
- dbdatarecord.cs
- DataBindingHandlerAttribute.cs
- ProtocolElement.cs
- ValidatedMobileControlConverter.cs
- TracePayload.cs
- EmptyEnumerator.cs
- ExpressionBuilder.cs
- CodeIdentifiers.cs
- XPathNode.cs
- PartialCachingControl.cs
- DllNotFoundException.cs
- LabelLiteral.cs
- LinkedList.cs
- Utility.cs
- SystemResourceHost.cs
- ScrollEvent.cs
- SafeEventLogReadHandle.cs
- TableRow.cs
- SecureUICommand.cs
- InvokeProviderWrapper.cs
- WorkBatch.cs
- SafeThemeHandle.cs
- TreeNodeBinding.cs
- TraceLevelHelper.cs
- PersonalizableTypeEntry.cs
- Transform.cs
- localization.cs
- CompilerResults.cs
- DataServiceConfiguration.cs
- ChameleonKey.cs
- ControlBuilder.cs
- ComponentEvent.cs
- AdjustableArrowCap.cs
- ScrollViewerAutomationPeer.cs
- Operand.cs
- SystemIcons.cs
- ComponentSerializationService.cs
- ZoneLinkButton.cs
- ToolZone.cs
- TextChangedEventArgs.cs
- infer.cs
- ViewBox.cs