Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //[....] //[....] //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextBox.cs
- HtmlInputText.cs
- ProgressPage.cs
- StringValueSerializer.cs
- TextBox.cs
- TreeNode.cs
- AssemblyHash.cs
- ExpressionBindingCollection.cs
- OracleDataReader.cs
- MenuItemStyleCollection.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ExpandSegmentCollection.cs
- BitmapEffectInput.cs
- DurableOperationAttribute.cs
- CharKeyFrameCollection.cs
- ContainerUIElement3D.cs
- UpdateRecord.cs
- BatchStream.cs
- XmlChoiceIdentifierAttribute.cs
- SelectingProviderEventArgs.cs
- PropertySourceInfo.cs
- FeatureAttribute.cs
- Utils.cs
- OleDbStruct.cs
- WindowsBrush.cs
- TextTreeUndoUnit.cs
- TableLayoutPanelResizeGlyph.cs
- RegexFCD.cs
- ExpressionBinding.cs
- SeekStoryboard.cs
- ConfigurationLocationCollection.cs
- QuaternionRotation3D.cs
- Function.cs
- HttpCookiesSection.cs
- InfocardChannelParameter.cs
- SessionPageStatePersister.cs
- DelegateTypeInfo.cs
- ActivityBuilderHelper.cs
- OracleNumber.cs
- OleDbFactory.cs
- XmlSchemaSequence.cs
- EpmAttributeNameBuilder.cs
- ErrorRuntimeConfig.cs
- FixedStringLookup.cs
- DataGridViewCellStyleChangedEventArgs.cs
- FontWeightConverter.cs
- MissingMemberException.cs
- DataGridViewCellStyleConverter.cs
- MatrixTransform3D.cs
- TextEditorTyping.cs
- ObjectIDGenerator.cs
- EditorZoneBase.cs
- Attachment.cs
- AlternateView.cs
- ServerIdentity.cs
- DesignBinding.cs
- TextEditorMouse.cs
- Style.cs
- Comparer.cs
- Delegate.cs
- Underline.cs
- AvTraceDetails.cs
- WorkItem.cs
- Logging.cs
- EnumDataContract.cs
- UnSafeCharBuffer.cs
- DockingAttribute.cs
- RemoteWebConfigurationHostStream.cs
- InteropBitmapSource.cs
- GeneralTransform3DTo2D.cs
- ItemDragEvent.cs
- BuildResult.cs
- FilteredXmlReader.cs
- VectorKeyFrameCollection.cs
- SyndicationDeserializer.cs
- RectangleHotSpot.cs
- BitmapCacheBrush.cs
- UserInitiatedNavigationPermission.cs
- TableMethodGenerator.cs
- ListView.cs
- Focus.cs
- WebBrowser.cs
- WebBrowserDocumentCompletedEventHandler.cs
- XmlSchemaValidationException.cs
- DbProviderFactories.cs
- DataGridViewCellLinkedList.cs
- Pens.cs
- CodeAccessSecurityEngine.cs
- IdentityReference.cs
- IteratorDescriptor.cs
- XmlConvert.cs
- _TLSstream.cs
- Int32CollectionValueSerializer.cs
- FontStyle.cs
- NetworkInformationPermission.cs
- Socket.cs
- PermissionSet.cs
- AttachedPropertyBrowsableAttribute.cs
- Crc32Helper.cs
- Quaternion.cs