Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- GenericTextProperties.cs
- NonVisualControlAttribute.cs
- ClaimTypes.cs
- ResourceKey.cs
- Object.cs
- ModuleConfigurationInfo.cs
- Model3DCollection.cs
- TextRangeAdaptor.cs
- AnnotationResourceChangedEventArgs.cs
- ScriptManager.cs
- ParameterBuilder.cs
- ZipIOLocalFileBlock.cs
- XmlSchemaFacet.cs
- MessageSecurityOverMsmq.cs
- HttpModuleAction.cs
- PartialArray.cs
- ItemDragEvent.cs
- MatchNoneMessageFilter.cs
- Clock.cs
- InteropAutomationProvider.cs
- BackgroundWorker.cs
- SchemaImporterExtensionElement.cs
- Selector.cs
- ToolboxCategory.cs
- ToolStripPanelDesigner.cs
- MeasureData.cs
- SingleAnimation.cs
- Timer.cs
- ListViewGroupItemCollection.cs
- PrePrepareMethodAttribute.cs
- DropShadowEffect.cs
- Mapping.cs
- InstanceCreationEditor.cs
- WinInet.cs
- BinHexEncoding.cs
- PointIndependentAnimationStorage.cs
- RegexNode.cs
- ActivityDesignerLayoutSerializers.cs
- EncoderBestFitFallback.cs
- MarshalByRefObject.cs
- OutputCacheSection.cs
- LocalBuilder.cs
- ResourceDictionary.cs
- FormView.cs
- WebPartEditorCancelVerb.cs
- ProcessProtocolHandler.cs
- ExecutionContext.cs
- ClientBuildManagerCallback.cs
- UdpTransportSettings.cs
- SizeChangedEventArgs.cs
- InProcStateClientManager.cs
- DataObjectEventArgs.cs
- MLangCodePageEncoding.cs
- ZoneIdentityPermission.cs
- FunctionUpdateCommand.cs
- RadioButton.cs
- WebBrowserProgressChangedEventHandler.cs
- ObjectDesignerDataSourceView.cs
- ListBindableAttribute.cs
- TempEnvironment.cs
- Polygon.cs
- ContainerControl.cs
- ContourSegment.cs
- DragCompletedEventArgs.cs
- DependencyObject.cs
- PermissionSet.cs
- ButtonBase.cs
- AssociationEndMember.cs
- WinFormsComponentEditor.cs
- TableLayoutSettings.cs
- RepeaterItemEventArgs.cs
- ExeConfigurationFileMap.cs
- MenuItemStyle.cs
- _IPv4Address.cs
- TextModifier.cs
- BasicHttpSecurity.cs
- ToolBarButtonClickEvent.cs
- ModelServiceImpl.cs
- TextElement.cs
- _ChunkParse.cs
- HtmlPageAdapter.cs
- TypedElement.cs
- figurelengthconverter.cs
- AutoResizedEvent.cs
- FixedHighlight.cs
- StandardToolWindows.cs
- SqlInternalConnection.cs
- OutgoingWebResponseContext.cs
- DataBoundControl.cs
- DynamicResourceExtensionConverter.cs
- TypeElement.cs
- SqlGenerator.cs
- VScrollBar.cs
- XmlExtensionFunction.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ScopelessEnumAttribute.cs
- SmtpClient.cs
- HttpProfileBase.cs
- MobileControlDesigner.cs
- entityreference_tresulttype.cs