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
- HwndSource.cs
- RecognizeCompletedEventArgs.cs
- HttpConfigurationSystem.cs
- HtmlContainerControl.cs
- PrintDialogDesigner.cs
- SqlDataSourceQueryEditorForm.cs
- AggregateNode.cs
- Point4D.cs
- HttpContextWrapper.cs
- ShapingWorkspace.cs
- XamlDesignerSerializationManager.cs
- DataTableClearEvent.cs
- OdbcConnectionOpen.cs
- SymbolTable.cs
- HttpModule.cs
- RadioButtonBaseAdapter.cs
- PrimitiveSchema.cs
- SystemInformation.cs
- SqlFlattener.cs
- TextRangeAdaptor.cs
- BindableAttribute.cs
- PointAnimationClockResource.cs
- TimeoutHelper.cs
- Peer.cs
- ArglessEventHandlerProxy.cs
- WorkItem.cs
- TableItemProviderWrapper.cs
- XmlCharType.cs
- SQLDateTimeStorage.cs
- BamlReader.cs
- DeferredSelectedIndexReference.cs
- VisualTreeHelper.cs
- LockedAssemblyCache.cs
- TextDecorationUnitValidation.cs
- MethodCallConverter.cs
- TreeBuilder.cs
- PropertiesTab.cs
- DataGridItem.cs
- ContextProperty.cs
- TokenBasedSet.cs
- LocalizationParserHooks.cs
- SimpleType.cs
- _PooledStream.cs
- SmtpSection.cs
- _UriTypeConverter.cs
- DoubleUtil.cs
- DataConnectionHelper.cs
- webclient.cs
- SHA384.cs
- OracleException.cs
- RadioButton.cs
- PriorityBinding.cs
- OleDbConnectionInternal.cs
- XmlAtomicValue.cs
- Exceptions.cs
- RuntimeArgumentHandle.cs
- HScrollProperties.cs
- BuildProviderUtils.cs
- GPPOINTF.cs
- webeventbuffer.cs
- ContainerUtilities.cs
- CompatibleIComparer.cs
- XMLSchema.cs
- ADMembershipUser.cs
- XmlCharType.cs
- HttpCookie.cs
- Compiler.cs
- SecurityCredentialsManager.cs
- ExpanderAutomationPeer.cs
- PopupRoot.cs
- UserControlAutomationPeer.cs
- __FastResourceComparer.cs
- securitymgrsite.cs
- DataGridViewCellStyle.cs
- TypeDefinition.cs
- xmlglyphRunInfo.cs
- ACL.cs
- StaticDataManager.cs
- OdbcPermission.cs
- ConnectionInterfaceCollection.cs
- TextEditorTables.cs
- Decimal.cs
- CollectionChange.cs
- dsa.cs
- TreeNodeStyle.cs
- RedirectionProxy.cs
- DataServices.cs
- Image.cs
- CssTextWriter.cs
- CustomTypeDescriptor.cs
- ConstraintCollection.cs
- SQLChars.cs
- WebPartEventArgs.cs
- NamespaceInfo.cs
- ErrorWebPart.cs
- PresentationAppDomainManager.cs
- WebPartConnectionsConfigureVerb.cs
- XmlSchemaSimpleTypeList.cs
- BuildProvidersCompiler.cs
- Attributes.cs