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
- WindowsEditBox.cs
- FunctionDescription.cs
- __Filters.cs
- Point.cs
- DocumentViewerBaseAutomationPeer.cs
- CurrentChangedEventManager.cs
- MatrixAnimationUsingKeyFrames.cs
- ExtendedProperty.cs
- WebConfigurationManager.cs
- GlyphShapingProperties.cs
- Script.cs
- DefaultCommandExtensionCallback.cs
- ContentDefinition.cs
- DataGridViewCellConverter.cs
- SemanticBasicElement.cs
- RegexGroupCollection.cs
- WebConfigurationHostFileChange.cs
- HandlerFactoryWrapper.cs
- SqlNodeAnnotation.cs
- AudioSignalProblemOccurredEventArgs.cs
- ErrorFormatterPage.cs
- Animatable.cs
- ListenerConnectionDemuxer.cs
- SqlConnectionHelper.cs
- WebSysDescriptionAttribute.cs
- RelatedView.cs
- TrustManager.cs
- ValueTable.cs
- SqlColumnizer.cs
- Stroke2.cs
- SpoolingTask.cs
- Expression.cs
- DataObjectSettingDataEventArgs.cs
- EnumCodeDomSerializer.cs
- shaperfactory.cs
- HostedHttpTransportManager.cs
- TreeNodeStyle.cs
- RichTextBox.cs
- ComAdminWrapper.cs
- WindowsMenu.cs
- CodeIndexerExpression.cs
- xamlnodes.cs
- Operator.cs
- IsolatedStorageException.cs
- HtmlProps.cs
- IDispatchConstantAttribute.cs
- EdmPropertyAttribute.cs
- LinkedResourceCollection.cs
- CodeMethodInvokeExpression.cs
- AttributeData.cs
- CodeComment.cs
- UriExt.cs
- sitestring.cs
- ExceptionValidationRule.cs
- XmlSchemaType.cs
- SqlCommandSet.cs
- XmlNodeComparer.cs
- MergeFailedEvent.cs
- XPathAxisIterator.cs
- ToolboxItemWrapper.cs
- ConditionalAttribute.cs
- LineServicesRun.cs
- EventWaitHandleSecurity.cs
- QueryOperationResponseOfT.cs
- PageWrapper.cs
- updatecommandorderer.cs
- WebControlAdapter.cs
- MetadataPropertyAttribute.cs
- InputProcessorProfilesLoader.cs
- ScriptManagerProxy.cs
- COM2FontConverter.cs
- DbConnectionInternal.cs
- XmlUtil.cs
- SchemaCollectionPreprocessor.cs
- SkipStoryboardToFill.cs
- ColorPalette.cs
- BitmapSizeOptions.cs
- ToolStripGripRenderEventArgs.cs
- InfoCardSymmetricAlgorithm.cs
- CodeLinePragma.cs
- SymbolMethod.cs
- Screen.cs
- KeyValuePair.cs
- RequestCachePolicyConverter.cs
- DesignerVerb.cs
- WmlImageAdapter.cs
- TaskHelper.cs
- StyleHelper.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- RowCache.cs
- DataSourceSelectArguments.cs
- SecurityKeyType.cs
- OdbcCommand.cs
- DataContractAttribute.cs
- PolygonHotSpot.cs
- HostedHttpRequestAsyncResult.cs
- CodeCatchClause.cs
- ColorAnimationBase.cs
- TabControlAutomationPeer.cs
- SqlComparer.cs