Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Odbc / OdbcReferenceCollection.cs / 1305376 / OdbcReferenceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System; using System.Data; using System.Data.Common; using System.Data.ProviderBase; using System.Diagnostics; namespace System.Data.Odbc { sealed internal class OdbcReferenceCollection : DbReferenceCollection { internal const int Closing = 0; internal const int Recover = 1; internal const int CommandTag = 1; override public void Add(object value, int tag) { base.AddItem(value, tag); } override protected bool NotifyItem(int message, int tag, object value) { switch (message) { case Recover: if (CommandTag == tag) { ((OdbcCommand) value).RecoverFromConnection(); } else { Debug.Assert(false, "shouldn't be here"); } break; case Closing: if (CommandTag == tag) { ((OdbcCommand) value).CloseFromConnection(); } else { Debug.Assert(false, "shouldn't be here"); } break; default: Debug.Assert(false, "shouldn't be here"); break; } return false; // remove it from the collection } override public void Remove(object value) { base.RemoveItem(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
- ColorAnimation.cs
- ActivationService.cs
- DBDataPermissionAttribute.cs
- ClientEventManager.cs
- ReadOnlyDictionary.cs
- WindowsToolbar.cs
- ProcessHostMapPath.cs
- FixedTextBuilder.cs
- BitmapFrameEncode.cs
- ToolStrip.cs
- ExpressionContext.cs
- RectKeyFrameCollection.cs
- ControlValuePropertyAttribute.cs
- CodeTypeReferenceCollection.cs
- RequestTimeoutManager.cs
- SqlCacheDependencySection.cs
- QilTernary.cs
- WebPartCancelEventArgs.cs
- GraphicsPath.cs
- ProjectionCamera.cs
- ArrayTypeMismatchException.cs
- _SslStream.cs
- SyntaxCheck.cs
- IdnElement.cs
- ObjectPropertyMapping.cs
- StylusEditingBehavior.cs
- MenuItemStyle.cs
- LayoutEditorPart.cs
- TreeViewHitTestInfo.cs
- FixedSOMContainer.cs
- HtmlInputButton.cs
- GridView.cs
- RegexInterpreter.cs
- regiisutil.cs
- InputProcessorProfilesLoader.cs
- ContentPresenter.cs
- JsonUriDataContract.cs
- HttpConfigurationContext.cs
- XmlNodeReader.cs
- MsmqReceiveHelper.cs
- Fonts.cs
- COMException.cs
- SolidBrush.cs
- CachedCompositeFamily.cs
- TypeHelper.cs
- Delegate.cs
- LocationSectionRecord.cs
- JoinElimination.cs
- TripleDESCryptoServiceProvider.cs
- URLAttribute.cs
- AffineTransform3D.cs
- ServiceModelConfigurationElementCollection.cs
- CodeMethodReturnStatement.cs
- FacetChecker.cs
- AnnotationHelper.cs
- ICspAsymmetricAlgorithm.cs
- ValidatorUtils.cs
- MatrixConverter.cs
- WebPartTransformer.cs
- FtpWebResponse.cs
- StaticSiteMapProvider.cs
- HwndHostAutomationPeer.cs
- ClientData.cs
- BufferAllocator.cs
- CrossAppDomainChannel.cs
- QuaternionRotation3D.cs
- SynchronizedDispatch.cs
- ConfigsHelper.cs
- StylusPointPropertyInfo.cs
- ResourceDictionaryCollection.cs
- ComponentResourceManager.cs
- TraceXPathNavigator.cs
- CacheEntry.cs
- ClickablePoint.cs
- DefinitionUpdate.cs
- DetailsViewPagerRow.cs
- AddressHeaderCollectionElement.cs
- HtmlWindowCollection.cs
- ContentElement.cs
- DebugHandleTracker.cs
- IndependentAnimationStorage.cs
- TrackingConditionCollection.cs
- Utils.cs
- arc.cs
- InputLanguageManager.cs
- CommonProperties.cs
- ToolStripDesignerAvailabilityAttribute.cs
- TopClause.cs
- ConfigPathUtility.cs
- InvariantComparer.cs
- unsafenativemethodstextservices.cs
- ObjectMemberMapping.cs
- NotConverter.cs
- UserControlParser.cs
- securitycriticaldataformultiplegetandset.cs
- ToolStripContentPanel.cs
- StylusDownEventArgs.cs
- HttpListenerResponse.cs
- FieldNameLookup.cs
- PowerStatus.cs