Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Data / System / Data / OleDb / OleDbErrorCollection.cs / 1 / OleDbErrorCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.OleDb { using System; using System.ComponentModel; using System.Collections; using System.Data.Common; [Serializable, ListBindable(false)] #if WINFSInternalOnly internal #else public #endif sealed class OleDbErrorCollection : System.Collections.ICollection { readonly private ArrayList items; // WebData 106655 internal OleDbErrorCollection(UnsafeNativeMethods.IErrorInfo errorInfo) { ArrayList items = new ArrayList(); Bid.Trace("IErrorRecords\n"); UnsafeNativeMethods.IErrorRecords errorRecords = (errorInfo as UnsafeNativeMethods.IErrorRecords); if (null != errorRecords) { int recordCount = errorRecords.GetRecordCount(); Bid.Trace(" RecordCount=%d\n", recordCount); for (int i = 0; i < recordCount; ++i) { OleDbError error = new OleDbError(errorRecords, i); items.Add(error); } } this.items = items; } bool System.Collections.ICollection.IsSynchronized { get { return false;} } object System.Collections.ICollection.SyncRoot { get { return this;} } public int Count { get { ArrayList items = this.items; return ((null != items) ? items.Count : 0); } } public OleDbError this[int index] { get { return (this.items[index] as OleDbError); } } internal void AddRange(ICollection c) { items.AddRange(c); } public void CopyTo(Array array, int index) { this.items.CopyTo(array, index); } public void CopyTo (OleDbError[] array, int index) { this.items.CopyTo(array, index); } public IEnumerator GetEnumerator() { return this.items.GetEnumerator(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.OleDb { using System; using System.ComponentModel; using System.Collections; using System.Data.Common; [Serializable, ListBindable(false)] #if WINFSInternalOnly internal #else public #endif sealed class OleDbErrorCollection : System.Collections.ICollection { readonly private ArrayList items; // WebData 106655 internal OleDbErrorCollection(UnsafeNativeMethods.IErrorInfo errorInfo) { ArrayList items = new ArrayList(); Bid.Trace("IErrorRecords\n"); UnsafeNativeMethods.IErrorRecords errorRecords = (errorInfo as UnsafeNativeMethods.IErrorRecords); if (null != errorRecords) { int recordCount = errorRecords.GetRecordCount(); Bid.Trace(" RecordCount=%d\n", recordCount); for (int i = 0; i < recordCount; ++i) { OleDbError error = new OleDbError(errorRecords, i); items.Add(error); } } this.items = items; } bool System.Collections.ICollection.IsSynchronized { get { return false;} } object System.Collections.ICollection.SyncRoot { get { return this;} } public int Count { get { ArrayList items = this.items; return ((null != items) ? items.Count : 0); } } public OleDbError this[int index] { get { return (this.items[index] as OleDbError); } } internal void AddRange(ICollection c) { items.AddRange(c); } public void CopyTo(Array array, int index) { this.items.CopyTo(array, index); } public void CopyTo (OleDbError[] array, int index) { this.items.CopyTo(array, index); } public IEnumerator GetEnumerator() { return this.items.GetEnumerator(); } } } // 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
- ExternalException.cs
- ObjectDataProvider.cs
- FixedHyperLink.cs
- WebPartCatalogAddVerb.cs
- ListSourceHelper.cs
- DataServiceQueryException.cs
- TableCellCollection.cs
- DataGridViewRowEventArgs.cs
- ByteKeyFrameCollection.cs
- AppAction.cs
- AssertFilter.cs
- FrameworkReadOnlyPropertyMetadata.cs
- AddInStore.cs
- InternalRelationshipCollection.cs
- XmlEncodedRawTextWriter.cs
- VectorConverter.cs
- DiscoveryRequestHandler.cs
- DataObjectAttribute.cs
- RoutingChannelExtension.cs
- SecureEnvironment.cs
- AppSettingsExpressionBuilder.cs
- XPathNodeInfoAtom.cs
- RegexCompilationInfo.cs
- ByeMessageApril2005.cs
- UserPreferenceChangedEventArgs.cs
- DefaultPrintController.cs
- XmlStringTable.cs
- WindowsIPAddress.cs
- ProgressBarRenderer.cs
- WebBodyFormatMessageProperty.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ProjectionRewriter.cs
- ParserStreamGeometryContext.cs
- AssociationSet.cs
- ManagedWndProcTracker.cs
- SoapReflectionImporter.cs
- ChangeConflicts.cs
- DataRowChangeEvent.cs
- ToolStripSplitStackLayout.cs
- Size.cs
- RoleServiceManager.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- QilIterator.cs
- PropagatorResult.cs
- HtmlInputFile.cs
- IndentedTextWriter.cs
- SoapDocumentMethodAttribute.cs
- RealizationContext.cs
- PinnedBufferMemoryStream.cs
- ScaleTransform.cs
- WrapperSecurityCommunicationObject.cs
- TextTreeTextNode.cs
- EntityEntry.cs
- DockPattern.cs
- ToolZone.cs
- DecimalConverter.cs
- ProtectedConfigurationProviderCollection.cs
- XmlSchemaAny.cs
- DummyDataSource.cs
- WebPartHeaderCloseVerb.cs
- HTMLTextWriter.cs
- CommandBindingCollection.cs
- RegexBoyerMoore.cs
- CodeSnippetTypeMember.cs
- PathTooLongException.cs
- DBParameter.cs
- CommandManager.cs
- PrintPreviewDialog.cs
- _ProxyRegBlob.cs
- WeakEventTable.cs
- ObjectViewFactory.cs
- SqlTriggerAttribute.cs
- TypeRefElement.cs
- _SslStream.cs
- UnionCqlBlock.cs
- InstanceNormalEvent.cs
- RuntimeConfigLKG.cs
- Rotation3D.cs
- DataGridViewTextBoxEditingControl.cs
- xmlglyphRunInfo.cs
- IntSecurity.cs
- TextView.cs
- RecognitionResult.cs
- RightsManagementEncryptedStream.cs
- WeakRefEnumerator.cs
- NavigateEvent.cs
- ErrorHandler.cs
- ComponentManagerBroker.cs
- DbCommandTree.cs
- FixedFindEngine.cs
- XappLauncher.cs
- PathGeometry.cs
- MatrixTransform.cs
- ThicknessAnimationUsingKeyFrames.cs
- AssemblyCache.cs
- StaticFileHandler.cs
- Method.cs
- RadialGradientBrush.cs
- SerializationInfo.cs
- ToRequest.cs