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
- MaskInputRejectedEventArgs.cs
- BitFlagsGenerator.cs
- DesignerToolboxInfo.cs
- TaskbarItemInfo.cs
- ServiceNameElementCollection.cs
- PerformanceCounterManager.cs
- SqlConnectionPoolProviderInfo.cs
- MeshGeometry3D.cs
- Point4DConverter.cs
- Variant.cs
- SHA384.cs
- PackageFilter.cs
- PrimitiveDataContract.cs
- TextMarkerSource.cs
- CodeMemberProperty.cs
- NameValueSectionHandler.cs
- ZipIOFileItemStream.cs
- ReliabilityContractAttribute.cs
- IdentityModelDictionary.cs
- x509utils.cs
- DeclarativeCatalogPart.cs
- WebPartConnectVerb.cs
- NetCodeGroup.cs
- DesignerExtenders.cs
- PropertyValueChangedEvent.cs
- ConnectionsZoneDesigner.cs
- PageAsyncTask.cs
- TreeBuilderBamlTranslator.cs
- Transform.cs
- VirtualPathUtility.cs
- ValidatorCollection.cs
- TextSelectionHelper.cs
- parserscommon.cs
- GuidelineCollection.cs
- CompModSwitches.cs
- SoapSchemaImporter.cs
- X509Certificate2Collection.cs
- DataGridColumn.cs
- BindingEditor.xaml.cs
- DataGridViewCellPaintingEventArgs.cs
- AsyncOperation.cs
- SymbolUsageManager.cs
- TextTreeRootTextBlock.cs
- MulticastDelegate.cs
- DataControlFieldHeaderCell.cs
- UrlPath.cs
- WCFModelStrings.Designer.cs
- ScrollBarAutomationPeer.cs
- ToolStripOverflow.cs
- SafeNativeMethods.cs
- CharacterHit.cs
- PublisherIdentityPermission.cs
- XamlBrushSerializer.cs
- CalendarTable.cs
- Domain.cs
- StatusBarDrawItemEvent.cs
- QueryCursorEventArgs.cs
- PartialCachingAttribute.cs
- CodeAttachEventStatement.cs
- SymmetricKeyWrap.cs
- TypeConstant.cs
- HttpModulesInstallComponent.cs
- TiffBitmapDecoder.cs
- FatalException.cs
- ExtenderHelpers.cs
- ResourceBinder.cs
- MemberCollection.cs
- Html32TextWriter.cs
- RenderOptions.cs
- TargetInvocationException.cs
- TrackingStringDictionary.cs
- RegistryConfigurationProvider.cs
- ExpanderAutomationPeer.cs
- RequestCache.cs
- ViewStateModeByIdAttribute.cs
- CurrentChangedEventManager.cs
- IisTraceWebEventProvider.cs
- FieldToken.cs
- EmptyStringExpandableObjectConverter.cs
- ShadowGlyph.cs
- GreenMethods.cs
- OutputCacheSettingsSection.cs
- AuthenticationException.cs
- IUnknownConstantAttribute.cs
- SystemIPInterfaceProperties.cs
- RecommendedAsConfigurableAttribute.cs
- PropertyDescriptorCollection.cs
- SamlConstants.cs
- RawStylusSystemGestureInputReport.cs
- StateBag.cs
- DesignerWebPartChrome.cs
- PropertyGridView.cs
- TextFormatter.cs
- ResourceDisplayNameAttribute.cs
- StrokeNodeOperations.cs
- OptimalBreakSession.cs
- ResizeGrip.cs
- EdmToObjectNamespaceMap.cs
- AutomationPeer.cs
- StreamingContext.cs