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
- XPathItem.cs
- RoleBoolean.cs
- FileDialogCustomPlace.cs
- VSDExceptions.cs
- ImageMetadata.cs
- TypeValidationEventArgs.cs
- ClassicBorderDecorator.cs
- SignedXmlDebugLog.cs
- WindowsListViewItem.cs
- ToolStripRenderer.cs
- MissingSatelliteAssemblyException.cs
- DataGridViewColumnTypeEditor.cs
- XsltSettings.cs
- PointConverter.cs
- HtmlInputFile.cs
- ActivatableWorkflowsQueryResult.cs
- CatalogZone.cs
- ResourceWriter.cs
- TimeoutValidationAttribute.cs
- MediaScriptCommandRoutedEventArgs.cs
- TypeElementCollection.cs
- WebPartZoneBase.cs
- PaperSize.cs
- figurelengthconverter.cs
- StrongNameIdentityPermission.cs
- VirtualDirectoryMapping.cs
- KeyEvent.cs
- EntityWrapper.cs
- SmiEventSink_DeferedProcessing.cs
- Process.cs
- PerformanceCounterPermission.cs
- XmlTextReaderImplHelpers.cs
- OpenFileDialog.cs
- TypefaceMap.cs
- SplitContainer.cs
- GlyphsSerializer.cs
- WebPartDisplayModeCancelEventArgs.cs
- DataTable.cs
- ScrollItemProviderWrapper.cs
- ClonableStack.cs
- dbenumerator.cs
- BindingObserver.cs
- VariableQuery.cs
- MultiBindingExpression.cs
- ProgressBarHighlightConverter.cs
- WebPartZoneBaseDesigner.cs
- PrePrepareMethodAttribute.cs
- FileDialogCustomPlaces.cs
- ByteConverter.cs
- DiffuseMaterial.cs
- EntitySqlQueryState.cs
- HtmlContainerControl.cs
- DataColumnChangeEvent.cs
- ScrollViewerAutomationPeer.cs
- SqlDataSourceQueryConverter.cs
- TrustManager.cs
- ProtocolsConfigurationEntry.cs
- InvokePattern.cs
- PerformanceCounterCategory.cs
- HtmlInputImage.cs
- SamlSubject.cs
- EntityDataSourceSelectingEventArgs.cs
- ScrollViewerAutomationPeer.cs
- TripleDES.cs
- BamlRecordReader.cs
- DetailsViewUpdatedEventArgs.cs
- BrowserCapabilitiesFactoryBase.cs
- ControlBuilder.cs
- DataListItemCollection.cs
- ColumnResult.cs
- NativeActivityTransactionContext.cs
- LinqToSqlWrapper.cs
- ImportDesigner.xaml.cs
- ExecutedRoutedEventArgs.cs
- TextTreePropertyUndoUnit.cs
- MessageUtil.cs
- EdmProviderManifest.cs
- ExtensionCollection.cs
- BoundColumn.cs
- LinqToSqlWrapper.cs
- TraceProvider.cs
- UnsafeNativeMethods.cs
- AuthenticationConfig.cs
- ExpandedWrapper.cs
- PrintPageEvent.cs
- StringFunctions.cs
- CapabilitiesState.cs
- SqlRetyper.cs
- RegularExpressionValidator.cs
- DataSourceCache.cs
- AsyncResult.cs
- GraphicsPathIterator.cs
- DragCompletedEventArgs.cs
- XmlRawWriter.cs
- XmlWrappingReader.cs
- ZipIORawDataFileBlock.cs
- UrlMapping.cs
- KeyFrames.cs
- AnnotationDocumentPaginator.cs
- HandleCollector.cs