Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- StreamUpdate.cs
- EndpointIdentityExtension.cs
- PeerResolverMode.cs
- EntitySetDataBindingList.cs
- SQLDecimalStorage.cs
- MappedMetaModel.cs
- TextRunTypographyProperties.cs
- DBDataPermission.cs
- ResourceReferenceExpression.cs
- ForwardPositionQuery.cs
- X509Certificate2.cs
- SecureConversationVersion.cs
- DataGridViewRowConverter.cs
- DataSourceHelper.cs
- ConfigurationElementCollection.cs
- CodeSnippetTypeMember.cs
- TemplatedWizardStep.cs
- ExtendedProtectionPolicyElement.cs
- FaultPropagationRecord.cs
- XmlSchemaSimpleTypeRestriction.cs
- ArraySegment.cs
- MenuCommandService.cs
- ApplicationInterop.cs
- PackageDigitalSignatureManager.cs
- NameObjectCollectionBase.cs
- SurrogateEncoder.cs
- StylusLogic.cs
- DispatcherOperation.cs
- ImagingCache.cs
- DBSchemaRow.cs
- ObjectStateFormatter.cs
- ScrollProviderWrapper.cs
- PatternMatcher.cs
- ListControl.cs
- XPathNodeList.cs
- Receive.cs
- SqlIdentifier.cs
- MsdtcWrapper.cs
- ByteStack.cs
- ThreadPool.cs
- RegexFCD.cs
- XmlWriter.cs
- PathFigure.cs
- SessionPageStateSection.cs
- GlyphRun.cs
- ResourcePermissionBaseEntry.cs
- TrackBar.cs
- SHA384.cs
- XmlSchemaAnnotated.cs
- ConnectionsZone.cs
- Operators.cs
- SamlAssertion.cs
- UpdateRecord.cs
- ToolStripStatusLabel.cs
- x509store.cs
- DrawingBrush.cs
- CultureInfoConverter.cs
- AssemblyAttributes.cs
- ThemeableAttribute.cs
- SystemWebExtensionsSectionGroup.cs
- LogSwitch.cs
- DetailsViewPageEventArgs.cs
- TdsEnums.cs
- ResourceManager.cs
- LockCookie.cs
- XmlReflectionImporter.cs
- RichTextBoxConstants.cs
- Encoder.cs
- dsa.cs
- BamlBinaryWriter.cs
- SharedUtils.cs
- EditorZone.cs
- OperationResponse.cs
- DataService.cs
- HttpRequestWrapper.cs
- PropertyInformation.cs
- TransactionInterop.cs
- DesignSurfaceEvent.cs
- DeviceContext2.cs
- TextBox.cs
- CommandTreeTypeHelper.cs
- OdbcException.cs
- WorkflowApplicationUnloadedException.cs
- KeyFrames.cs
- WebPartDisplayMode.cs
- AspNetSynchronizationContext.cs
- BooleanFunctions.cs
- XmlNodeComparer.cs
- XmlFormatExtensionAttribute.cs
- Trigger.cs
- WindowsIPAddress.cs
- DataGridViewRowsAddedEventArgs.cs
- WindowsGraphics2.cs
- UInt32Storage.cs
- PreProcessor.cs
- SafeProcessHandle.cs
- __ComObject.cs
- ItemType.cs
- WorkflowRequestContext.cs
- LogManagementAsyncResult.cs