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
- StorageFunctionMapping.cs
- PenThreadPool.cs
- SqlClientFactory.cs
- RadialGradientBrush.cs
- SessionStateUtil.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- EventBuilder.cs
- SqlRemoveConstantOrderBy.cs
- AttributedMetaModel.cs
- WindowsAuthenticationEventArgs.cs
- ClientScriptItem.cs
- ExpressionBindingCollection.cs
- Opcode.cs
- ComponentDispatcher.cs
- ByteFacetDescriptionElement.cs
- BindingContext.cs
- Pkcs7Recipient.cs
- _ScatterGatherBuffers.cs
- XmlBinaryWriter.cs
- RenderData.cs
- IndentedTextWriter.cs
- TextEditorCharacters.cs
- ReadOnlyDictionary.cs
- DataFieldEditor.cs
- UpdateRecord.cs
- RegexGroup.cs
- MaterializeFromAtom.cs
- StandardOleMarshalObject.cs
- IntMinMaxAggregationOperator.cs
- ImageCollectionEditor.cs
- StickyNoteContentControl.cs
- TileBrush.cs
- ReflectionUtil.cs
- XmlMtomWriter.cs
- SqlAliasesReferenced.cs
- Point4DValueSerializer.cs
- mediaclock.cs
- DesignerDataSourceView.cs
- Itemizer.cs
- GetResponse.cs
- ThrowHelper.cs
- ADConnectionHelper.cs
- CompositeFontFamily.cs
- Choices.cs
- ImageFormatConverter.cs
- HTMLTagNameToTypeMapper.cs
- HttpRequestCacheValidator.cs
- DrawListViewItemEventArgs.cs
- PartialTrustHelpers.cs
- DataGridTablesFactory.cs
- HMACSHA512.cs
- SamlDoNotCacheCondition.cs
- WebPartManager.cs
- WindowsComboBox.cs
- SecurityContext.cs
- KeyGesture.cs
- SecurityTokenParameters.cs
- SelectionEditor.cs
- CurrentTimeZone.cs
- MetafileHeader.cs
- LocalBuilder.cs
- OleDbErrorCollection.cs
- VisualState.cs
- PrintSystemException.cs
- BeginEvent.cs
- EmptyEnumerator.cs
- DependencyObjectValidator.cs
- Exceptions.cs
- ComponentChangedEvent.cs
- CellRelation.cs
- DataObjectSettingDataEventArgs.cs
- WriteTimeStream.cs
- HealthMonitoringSection.cs
- HttpValueCollection.cs
- oledbconnectionstring.cs
- TextBox.cs
- _ProxyChain.cs
- TransformerTypeCollection.cs
- uribuilder.cs
- StringAnimationBase.cs
- CryptoHandle.cs
- streamingZipPartStream.cs
- PropVariant.cs
- SmtpClient.cs
- OperationContext.cs
- SpeakInfo.cs
- SiteMapPath.cs
- PathFigureCollection.cs
- PackageRelationship.cs
- AppDomainProtocolHandler.cs
- Roles.cs
- FormsAuthentication.cs
- SamlAuthorityBinding.cs
- MetafileHeaderWmf.cs
- ConnectionStringsExpressionEditor.cs
- DocumentApplicationDocumentViewer.cs
- Activator.cs
- CodeTypeReferenceCollection.cs
- ExpressionPrefixAttribute.cs
- EntityTypeBase.cs