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
- ConfigUtil.cs
- XmlSchemaImport.cs
- UIElement.cs
- ShapeTypeface.cs
- Policy.cs
- AssociationSetEnd.cs
- SafeTokenHandle.cs
- TimeSpanParse.cs
- TimeStampChecker.cs
- XPathSelectionIterator.cs
- DataError.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- XmlWrappingReader.cs
- log.cs
- ProxyGenerator.cs
- ConstructorArgumentAttribute.cs
- TableItemProviderWrapper.cs
- SchemeSettingElement.cs
- InkPresenter.cs
- ManipulationDevice.cs
- DetailsViewModeEventArgs.cs
- ValidatorCompatibilityHelper.cs
- _NativeSSPI.cs
- DataTableNewRowEvent.cs
- util.cs
- TypeLibConverter.cs
- EqualityComparer.cs
- Opcode.cs
- XmlWriterDelegator.cs
- _SecureChannel.cs
- ColorMap.cs
- CodeGotoStatement.cs
- ConditionalAttribute.cs
- NamedServiceModelExtensionCollectionElement.cs
- RequestResizeEvent.cs
- X509SecurityTokenParameters.cs
- WebPartConnectionsCancelEventArgs.cs
- ManagementEventWatcher.cs
- ListBoxItemAutomationPeer.cs
- FileInfo.cs
- FileInfo.cs
- LOSFormatter.cs
- ByteArrayHelperWithString.cs
- TileModeValidation.cs
- SequenceDesigner.xaml.cs
- TdsRecordBufferSetter.cs
- safemediahandle.cs
- BulletedListEventArgs.cs
- MailDefinition.cs
- SiteMapHierarchicalDataSourceView.cs
- PointLight.cs
- PrincipalPermission.cs
- RectangleF.cs
- ChtmlCalendarAdapter.cs
- FloaterParaClient.cs
- ParallelTimeline.cs
- SqlRecordBuffer.cs
- StructuralObject.cs
- CompoundFileStreamReference.cs
- Timer.cs
- EventWaitHandle.cs
- ToolStripLabel.cs
- ActivityDesignerResources.cs
- ExpressionBinding.cs
- Matrix3DStack.cs
- MSAAEventDispatcher.cs
- SqlCacheDependencyDatabase.cs
- ParallelEnumerable.cs
- OracleRowUpdatingEventArgs.cs
- ping.cs
- QueryContinueDragEvent.cs
- DiscoveryUtility.cs
- FixedSOMTextRun.cs
- PrivateFontCollection.cs
- XPathSelectionIterator.cs
- SchemaManager.cs
- XomlCompilerHelpers.cs
- ModelPropertyCollectionImpl.cs
- GridViewRowCollection.cs
- ResourceProviderFactory.cs
- FormsAuthenticationTicket.cs
- WebResourceUtil.cs
- Button.cs
- EventOpcode.cs
- HtmlDocument.cs
- ProgressBar.cs
- HostingEnvironmentSection.cs
- ManagedWndProcTracker.cs
- ContentOperations.cs
- BrowserCapabilitiesCompiler.cs
- Parser.cs
- PermissionListSet.cs
- Visual3DCollection.cs
- OutputCacheSettings.cs
- HtmlInputRadioButton.cs
- DeviceContexts.cs
- AuthenticationService.cs
- DataTableNewRowEvent.cs
- ComPlusSynchronizationContext.cs
- RectKeyFrameCollection.cs