Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- BindingList.cs
- SynchronizationLockException.cs
- PageParserFilter.cs
- UpdatePanel.cs
- NavigationHelper.cs
- ModulesEntry.cs
- RuntimeWrappedException.cs
- ListChangedEventArgs.cs
- StreamResourceInfo.cs
- ForwardPositionQuery.cs
- SecurityElement.cs
- MarshalDirectiveException.cs
- HttpResponse.cs
- FormsAuthenticationTicket.cs
- InheritanceService.cs
- TypeSystem.cs
- HostedHttpContext.cs
- InvalidFilterCriteriaException.cs
- TimelineGroup.cs
- DataGridViewCellPaintingEventArgs.cs
- CompareValidator.cs
- SiteMap.cs
- VisualStyleElement.cs
- Contracts.cs
- XmlChildNodes.cs
- XmlSchemaComplexType.cs
- Parameter.cs
- DataGridViewColumnCollection.cs
- COM2ComponentEditor.cs
- BitmapDecoder.cs
- UTF7Encoding.cs
- ListViewGroupCollectionEditor.cs
- BitmapEffectInputData.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- DispatcherSynchronizationContext.cs
- Thickness.cs
- DrawingImage.cs
- TypeExtension.cs
- MsmqHostedTransportConfiguration.cs
- LicenseManager.cs
- SafeRegistryHandle.cs
- ImpersonateTokenRef.cs
- MessageSmuggler.cs
- CompositeFontParser.cs
- control.ime.cs
- UITypeEditor.cs
- Win32.cs
- PtsPage.cs
- DictionaryGlobals.cs
- MediaElementAutomationPeer.cs
- RenamedEventArgs.cs
- BoolExpr.cs
- FieldBuilder.cs
- _CommandStream.cs
- PeerEndPoint.cs
- XmlCharCheckingWriter.cs
- DrawListViewItemEventArgs.cs
- EdmProviderManifest.cs
- OracleConnectionString.cs
- EpmCustomContentWriterNodeData.cs
- RuleInfoComparer.cs
- DebugInfoGenerator.cs
- VersionedStreamOwner.cs
- PeerResolverElement.cs
- BatchServiceHost.cs
- WebPartMenuStyle.cs
- FakeModelItemImpl.cs
- GatewayIPAddressInformationCollection.cs
- Content.cs
- EndpointDiscoveryBehavior.cs
- XmlSchemaInclude.cs
- TextReturnReader.cs
- CreateUserErrorEventArgs.cs
- ALinqExpressionVisitor.cs
- SqlDataSource.cs
- ObjectViewFactory.cs
- Enum.cs
- Path.cs
- OledbConnectionStringbuilder.cs
- WorkflowTimerService.cs
- ComAdminInterfaces.cs
- IERequestCache.cs
- RegexCode.cs
- BuiltInPermissionSets.cs
- MetadataItemEmitter.cs
- NativeMethods.cs
- XmlSchemaImport.cs
- AxisAngleRotation3D.cs
- TypeInitializationException.cs
- PathFigureCollection.cs
- DesignTimeVisibleAttribute.cs
- RegexMatchCollection.cs
- DiscoveryClientOutputChannel.cs
- PathFigure.cs
- StateManagedCollection.cs
- SoapDocumentMethodAttribute.cs
- MediaElementAutomationPeer.cs
- SqlProfileProvider.cs
- DmlSqlGenerator.cs
- FileResponseElement.cs