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
- DbExpressionVisitor.cs
- SymbolEqualComparer.cs
- SoapTypeAttribute.cs
- CustomErrorCollection.cs
- ExpandSegment.cs
- UrlAuthorizationModule.cs
- ServiceHttpHandlerFactory.cs
- DataGridViewEditingControlShowingEventArgs.cs
- ListParaClient.cs
- InsufficientMemoryException.cs
- XmlElementAttributes.cs
- ConsoleTraceListener.cs
- EnumValidator.cs
- CompositeCollection.cs
- FreeFormPanel.cs
- DropDownButton.cs
- JoinSymbol.cs
- CallbackCorrelationInitializer.cs
- SponsorHelper.cs
- TabItemAutomationPeer.cs
- UserControlAutomationPeer.cs
- __ConsoleStream.cs
- CodeMethodInvokeExpression.cs
- DrawingImage.cs
- ConvertTextFrag.cs
- OAVariantLib.cs
- SmiGettersStream.cs
- DecimalFormatter.cs
- ThrowHelper.cs
- WebPartEditorApplyVerb.cs
- SessionStateModule.cs
- BooleanStorage.cs
- KoreanCalendar.cs
- EmptyCollection.cs
- PlatformCulture.cs
- EqualityArray.cs
- PackagePart.cs
- TdsParserSafeHandles.cs
- DoubleLink.cs
- FunctionParameter.cs
- FixedDocumentSequencePaginator.cs
- DiscreteKeyFrames.cs
- DeriveBytes.cs
- assemblycache.cs
- BamlRecords.cs
- SpellerHighlightLayer.cs
- RotateTransform3D.cs
- WmlPageAdapter.cs
- RadioButtonFlatAdapter.cs
- SiteMapNodeCollection.cs
- SafeFindHandle.cs
- SQLCharsStorage.cs
- DataGridColumnStyleMappingNameEditor.cs
- BufferBuilder.cs
- StreamResourceInfo.cs
- FileDialogPermission.cs
- ActivityAction.cs
- BulletChrome.cs
- SafeFileMappingHandle.cs
- AssemblyLoader.cs
- MSAANativeProvider.cs
- TransformedBitmap.cs
- Point4D.cs
- ConfigXmlSignificantWhitespace.cs
- AuthenticateEventArgs.cs
- ClickablePoint.cs
- BitmapVisualManager.cs
- TextEditorCopyPaste.cs
- AxisAngleRotation3D.cs
- WebPartMovingEventArgs.cs
- SemanticAnalyzer.cs
- EndpointConfigContainer.cs
- ISSmlParser.cs
- ThreadSafeList.cs
- InvalidPrinterException.cs
- webeventbuffer.cs
- BaseDataListComponentEditor.cs
- _HelperAsyncResults.cs
- PageMediaSize.cs
- Comparer.cs
- UserPersonalizationStateInfo.cs
- ServiceDescriptionImporter.cs
- DrawItemEvent.cs
- HeaderCollection.cs
- ReadOnlyDataSource.cs
- DataGridViewDesigner.cs
- GacUtil.cs
- TagPrefixInfo.cs
- AutomationPatternInfo.cs
- Selection.cs
- AppDomainInstanceProvider.cs
- baseaxisquery.cs
- FormViewModeEventArgs.cs
- OleDbPropertySetGuid.cs
- LinqMaximalSubtreeNominator.cs
- ParameterModifier.cs
- RequestCache.cs
- CacheSection.cs
- DefaultAutoFieldGenerator.cs
- TextHidden.cs