Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / Common / DbDataSourceEnumerator.cs / 1 / DbDataSourceEnumerator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Threading; #if WINFSInternalOnly internal #else public #endif abstract class DbDataSourceEnumerator { // V1.2.3300 protected DbDataSourceEnumerator() { // V1.2.3300 } abstract public DataTable GetDataSources(); // V1.2.3300 /* virtual public IAsyncResult BeginGetDataSources(AsyncCallback callback, object asyncStateObject) { // V1.2.3300 DbEnumSynchronousAsyncResult asyncResult = new DbEnumSynchronousAsyncResult(callback, asyncStateObject); try { asyncResult._dataTable = GetElements(); asyncResult.SetCompletedSynchronously(); } catch(DataAdapterException e) { ADP.TraceExceptionForCapture(e); asyncResult.ExceptionObject = e; } if (null == asyncResult._dataTable) { throw ADP.DataAdapter("no datatable"); } if (null != callback) { callback(asyncResult); } return asyncResult; } virtual public DataTable EndGetDataSources(IAsyncResult asyncResult) { // V1.2.3300 ADP.CheckArgumentNull(asyncResult, "asyncResult"); DbEnumSynchronousAsyncResult ar = (asyncResult as DbEnumSynchronousAsyncResult); if (ar._endXxxCalled) { throw ADP.InvalidOperation("EndGetElements called twice"); } ar._endXxxCalled = true; if (null != ar.ExceptionObject) { throw ar.ExceptionObject; } return ar._dataTable; } sealed private class DbEnumSynchronousAsyncResult : DbAsyncResult { internal bool _endXxxCalled; internal DataTable _dataTable; internal DbEnumSynchronousAsyncResult(AsyncCallback callback, Object asyncStateObject) : base(null, callback, asyncStateObject) { } } */ } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlClientWrapperSmiStream.cs
- WindowsSolidBrush.cs
- RelativeSource.cs
- SizeAnimation.cs
- FileDialog_Vista_Interop.cs
- ZipFileInfoCollection.cs
- DrawingContextDrawingContextWalker.cs
- SqlConnectionPoolGroupProviderInfo.cs
- SqlParameterizer.cs
- LocalIdCollection.cs
- BooleanAnimationUsingKeyFrames.cs
- CodeChecksumPragma.cs
- SqlConnectionString.cs
- precedingquery.cs
- TextRangeProviderWrapper.cs
- SQLMembershipProvider.cs
- ElementHostAutomationPeer.cs
- ResolvedKeyFrameEntry.cs
- UserControlAutomationPeer.cs
- FileDetails.cs
- SevenBitStream.cs
- FileSystemWatcher.cs
- QuadraticBezierSegment.cs
- ObjectConverter.cs
- OleDbRowUpdatedEvent.cs
- CodeDOMUtility.cs
- QilStrConcatenator.cs
- Version.cs
- CompositeDataBoundControl.cs
- ListSourceHelper.cs
- ReferenceSchema.cs
- FacetValueContainer.cs
- EventToken.cs
- HtmlTableRowCollection.cs
- ObjectQuery.cs
- StrongNameMembershipCondition.cs
- SqlConnection.cs
- InputScopeManager.cs
- Formatter.cs
- TextBoxAutoCompleteSourceConverter.cs
- WebReferencesBuildProvider.cs
- ToolStripSeparatorRenderEventArgs.cs
- MemoryMappedView.cs
- XmlSchemaType.cs
- StackSpiller.cs
- IdentityHolder.cs
- NativeMethods.cs
- WinFormsSecurity.cs
- ResourceProperty.cs
- TcpAppDomainProtocolHandler.cs
- LassoHelper.cs
- PasswordTextNavigator.cs
- SearchExpression.cs
- GlyphRunDrawing.cs
- ListGeneralPage.cs
- _AcceptOverlappedAsyncResult.cs
- StoreContentChangedEventArgs.cs
- VBCodeProvider.cs
- ASCIIEncoding.cs
- SoapTypeAttribute.cs
- LinqDataSourceValidationException.cs
- EventBookmark.cs
- InstanceCollisionException.cs
- DataTablePropertyDescriptor.cs
- VScrollProperties.cs
- SecurityTraceRecordHelper.cs
- SafeMemoryMappedViewHandle.cs
- OleServicesContext.cs
- SafeSecurityHandles.cs
- ProcessHostMapPath.cs
- UniformGrid.cs
- StandardCommands.cs
- HttpBrowserCapabilitiesWrapper.cs
- Token.cs
- SqlCrossApplyToCrossJoin.cs
- SoapInteropTypes.cs
- ViewService.cs
- MinimizableAttributeTypeConverter.cs
- MatrixTransform3D.cs
- CompositeFontParser.cs
- X509Utils.cs
- SqlBulkCopyColumnMappingCollection.cs
- _Semaphore.cs
- MetaModel.cs
- Accessible.cs
- HttpContext.cs
- JournalEntryStack.cs
- Utils.cs
- ColumnMapTranslator.cs
- CodeExpressionCollection.cs
- ByteStorage.cs
- StringComparer.cs
- DiscoveryMessageSequenceGenerator.cs
- RC2CryptoServiceProvider.cs
- XsdBuildProvider.cs
- TypeAccessException.cs
- UiaCoreApi.cs
- DataGridViewCellStyleChangedEventArgs.cs
- UICuesEvent.cs
- PathTooLongException.cs