Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / OleDb / OleDbReferenceCollection.cs / 1305376 / OleDbReferenceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.OleDb { using System; using System.Data; using System.Data.Common; using System.Data.ProviderBase; using System.Diagnostics; using System.Runtime.InteropServices; sealed internal class OleDbReferenceCollection : DbReferenceCollection { internal const int Closing = 0; internal const int Canceling = -1; internal const int CommandTag = 1; internal const int DataReaderTag = 2; override public void Add(object value, int tag) { base.AddItem(value, tag); } override protected bool NotifyItem(int message, int tag, object value) { bool canceling = (Canceling == message); if (CommandTag == tag) { ((OleDbCommand) value).CloseCommandFromConnection(canceling); } else if (DataReaderTag == tag) { ((OleDbDataReader) value).CloseReaderFromConnection(canceling); } else { Debug.Assert(false, "shouldn't be here"); } 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
- SpeechDetectedEventArgs.cs
- InputScope.cs
- StackSpiller.Bindings.cs
- Misc.cs
- XmlSchemaAnnotated.cs
- QueryStringConverter.cs
- KeyedCollection.cs
- ExclusiveNamedPipeTransportManager.cs
- TailCallAnalyzer.cs
- MarkupCompiler.cs
- CompilationRelaxations.cs
- Matrix3D.cs
- GlobalAllocSafeHandle.cs
- WebPartConnectionsDisconnectVerb.cs
- DelayedRegex.cs
- MetadataPropertyAttribute.cs
- HMACSHA1.cs
- TranslateTransform3D.cs
- DynamicFilterExpression.cs
- ExpressionConverter.cs
- PlainXmlWriter.cs
- NumberFormatInfo.cs
- DbMetaDataCollectionNames.cs
- PeerPresenceInfo.cs
- UnsafeNativeMethods.cs
- XmlDataLoader.cs
- ConstantExpression.cs
- TTSEvent.cs
- XslTransform.cs
- DetailsViewRowCollection.cs
- FilterEventArgs.cs
- ApplicationId.cs
- CommonObjectSecurity.cs
- ThreadExceptionDialog.cs
- ItemChangedEventArgs.cs
- SimplePropertyEntry.cs
- DataKey.cs
- SubpageParagraph.cs
- TabPanel.cs
- ImageMapEventArgs.cs
- XmlEnumAttribute.cs
- ReadOnlyDataSource.cs
- EndPoint.cs
- SendActivityEventArgs.cs
- SingleStorage.cs
- TextEmbeddedObject.cs
- StandardCommands.cs
- XmlTypeMapping.cs
- SafeSecurityHelper.cs
- WebPartConnectionsConnectVerb.cs
- DataGridViewRowPrePaintEventArgs.cs
- Repeater.cs
- XmlNamespaceMappingCollection.cs
- RequestQueue.cs
- AssemblyCollection.cs
- UnhandledExceptionEventArgs.cs
- RayMeshGeometry3DHitTestResult.cs
- PageAsyncTaskManager.cs
- PaintValueEventArgs.cs
- ApplicationInfo.cs
- ProfileEventArgs.cs
- InheritanceContextHelper.cs
- ListenerConnectionModeReader.cs
- ProtocolsConfigurationEntry.cs
- TreeNodeConverter.cs
- EditingCommands.cs
- SizeConverter.cs
- Misc.cs
- Registry.cs
- CultureMapper.cs
- Vector3DAnimationUsingKeyFrames.cs
- BamlResourceDeserializer.cs
- StrokeCollection2.cs
- ScriptMethodAttribute.cs
- StylusEditingBehavior.cs
- TraceUtility.cs
- SplitContainer.cs
- SAPICategories.cs
- SelectionPatternIdentifiers.cs
- SynchronizingStream.cs
- Invariant.cs
- TextStore.cs
- ValidatorCollection.cs
- HeaderPanel.cs
- EventMap.cs
- HttpApplicationFactory.cs
- InputProcessorProfilesLoader.cs
- CqlGenerator.cs
- ImageClickEventArgs.cs
- Context.cs
- ListViewGroup.cs
- _ShellExpression.cs
- Binding.cs
- safelinkcollection.cs
- ObjectTypeMapping.cs
- Utils.cs
- EndPoint.cs
- ToolStripItemClickedEventArgs.cs
- ActivityExecutor.cs
- GeometryDrawing.cs