Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / OleDb / OleDbErrorCollection.cs / 1305376 / 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)] public 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)] public 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
- Visual3D.cs
- WebControl.cs
- WebHeaderCollection.cs
- ExtensibleClassFactory.cs
- AnimationClockResource.cs
- MimeObjectFactory.cs
- DesignerSerializationVisibilityAttribute.cs
- StructuredTypeEmitter.cs
- ToolStripDropDownMenu.cs
- SerializationInfoEnumerator.cs
- CodeIndexerExpression.cs
- FormsAuthenticationEventArgs.cs
- StreamingContext.cs
- FrameAutomationPeer.cs
- DbConnectionStringCommon.cs
- GridViewCommandEventArgs.cs
- HorizontalAlignConverter.cs
- VideoDrawing.cs
- PrintingPermission.cs
- CfgParser.cs
- HtmlTableCellCollection.cs
- LocatorPartList.cs
- ToolStripOverflowButton.cs
- SecurityNegotiationException.cs
- ViewManagerAttribute.cs
- XmlComment.cs
- DynamicActionMessageFilter.cs
- EntityDataReader.cs
- EncoderExceptionFallback.cs
- SafeRightsManagementSessionHandle.cs
- DocumentPageHost.cs
- ImageDrawing.cs
- ReadWriteObjectLock.cs
- ParseElement.cs
- DataGridDesigner.cs
- Compiler.cs
- RepeatBehaviorConverter.cs
- DatasetMethodGenerator.cs
- XPathNavigatorReader.cs
- WorkflowViewElement.cs
- GreenMethods.cs
- EntitySetDataBindingList.cs
- CodeMemberMethod.cs
- MarkupCompiler.cs
- Panel.cs
- PermissionListSet.cs
- ObjectStateFormatter.cs
- GradientStopCollection.cs
- StorageRoot.cs
- DataTableTypeConverter.cs
- BamlWriter.cs
- Profiler.cs
- dbdatarecord.cs
- FunctionImportMapping.cs
- CodeGenerator.cs
- FileDataSourceCache.cs
- XmlSchemaAnnotation.cs
- OdbcException.cs
- PolyLineSegmentFigureLogic.cs
- DefinitionBase.cs
- EmptyEnumerator.cs
- TreeIterators.cs
- BitmapEncoder.cs
- StructuredProperty.cs
- CaseCqlBlock.cs
- Utilities.cs
- DocumentSequence.cs
- IpcChannelHelper.cs
- LinkArea.cs
- TraceRecord.cs
- FileDialog_Vista_Interop.cs
- DocumentViewer.cs
- BaseTemplateBuildProvider.cs
- SyncOperationState.cs
- XmlSchemaException.cs
- FileLoadException.cs
- Int16.cs
- FileDialog_Vista.cs
- BaseCodeDomTreeGenerator.cs
- Menu.cs
- BitmapCacheBrush.cs
- RedistVersionInfo.cs
- WebDisplayNameAttribute.cs
- TdsParser.cs
- printdlgexmarshaler.cs
- HttpConfigurationSystem.cs
- TypeListConverter.cs
- ObjectCloneHelper.cs
- XmlSchemaIdentityConstraint.cs
- WebBrowser.cs
- WinInetCache.cs
- TraceContextEventArgs.cs
- SoapSchemaImporter.cs
- ComponentEvent.cs
- DrawingVisual.cs
- PageSetupDialog.cs
- HttpModule.cs
- EventLogEntryCollection.cs
- OracleCommand.cs
- CodeEventReferenceExpression.cs