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
- SequenceNumber.cs
- CodeAttachEventStatement.cs
- DataTable.cs
- PropertyTabAttribute.cs
- CallSiteBinder.cs
- VisualStyleInformation.cs
- AsymmetricCryptoHandle.cs
- WebPartEditVerb.cs
- HyperLinkField.cs
- StateMachineHelpers.cs
- XsltOutput.cs
- XmlSchemaValidationException.cs
- QueryInterceptorAttribute.cs
- MatrixTransform3D.cs
- TargetInvocationException.cs
- RegexBoyerMoore.cs
- DBSchemaRow.cs
- SqlCachedBuffer.cs
- StagingAreaInputItem.cs
- DetailsViewUpdateEventArgs.cs
- UshortList2.cs
- ExpandedWrapper.cs
- PageRanges.cs
- VisualStyleElement.cs
- ModelItemDictionaryImpl.cs
- ListItemCollection.cs
- ContextBase.cs
- Stylus.cs
- SoapServerMessage.cs
- NamespaceCollection.cs
- XmlArrayItemAttributes.cs
- Unit.cs
- ResourceDictionary.cs
- BooleanFunctions.cs
- ColorConvertedBitmap.cs
- CmsInterop.cs
- DataGridViewRowPrePaintEventArgs.cs
- ConfigurationProperty.cs
- Int64AnimationBase.cs
- PermissionSet.cs
- XmlMapping.cs
- FilterQuery.cs
- SignatureHelper.cs
- ConfigXmlWhitespace.cs
- ConstraintConverter.cs
- XmlSerializationGeneratedCode.cs
- DrawingAttributes.cs
- FileUpload.cs
- HiddenField.cs
- ProjectionPruner.cs
- Utils.cs
- CodeAttributeArgumentCollection.cs
- LinqDataSource.cs
- BitmapEffect.cs
- DataTableNewRowEvent.cs
- PictureBox.cs
- ApplicationTrust.cs
- UInt16Storage.cs
- StickyNoteHelper.cs
- SqlBuilder.cs
- InProcStateClientManager.cs
- LinqDataSourceSelectEventArgs.cs
- basecomparevalidator.cs
- LogLogRecordHeader.cs
- LogicalExpr.cs
- FontDialog.cs
- VideoDrawing.cs
- FactoryMaker.cs
- LinkButton.cs
- NetworkStream.cs
- FormViewDeleteEventArgs.cs
- RectangleF.cs
- PeerName.cs
- SafeNativeMethods.cs
- NullableIntSumAggregationOperator.cs
- StrokeSerializer.cs
- XmlDictionary.cs
- SecureEnvironment.cs
- HttpRequestTraceRecord.cs
- TextRunTypographyProperties.cs
- SafeHandle.cs
- DataControlButton.cs
- WizardDesigner.cs
- XPathMessageFilterElementComparer.cs
- httpserverutility.cs
- StatusBarItemAutomationPeer.cs
- ButtonField.cs
- PolicyAssertionCollection.cs
- DateTimeValueSerializer.cs
- SchemaConstraints.cs
- DelimitedListTraceListener.cs
- Pens.cs
- cookiecontainer.cs
- CodeSubDirectoriesCollection.cs
- ConfigurationSection.cs
- ElementUtil.cs
- EntityDescriptor.cs
- CustomActivityDesigner.cs
- CompilationSection.cs
- FontDifferentiator.cs