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
- TreeViewItem.cs
- NativeMethods.cs
- GeneralTransform2DTo3DTo2D.cs
- SecurityManager.cs
- SchemaImporterExtensionsSection.cs
- XmlChildEnumerator.cs
- ObjectDataSource.cs
- AssemblyAttributes.cs
- PrivilegedConfigurationManager.cs
- StoryFragments.cs
- BaseServiceProvider.cs
- DoubleMinMaxAggregationOperator.cs
- SimpleWebHandlerParser.cs
- DataGridAddNewRow.cs
- UInt32Storage.cs
- ProfileServiceManager.cs
- InlinedAggregationOperator.cs
- HttpHandlerAction.cs
- ObjectContextServiceProvider.cs
- TextTreeNode.cs
- EntityClientCacheKey.cs
- ToolStripPanelRow.cs
- ObjectListSelectEventArgs.cs
- ColumnCollection.cs
- SafeTimerHandle.cs
- __FastResourceComparer.cs
- AdCreatedEventArgs.cs
- GridViewItemAutomationPeer.cs
- BuilderPropertyEntry.cs
- EditorBrowsableAttribute.cs
- XslCompiledTransform.cs
- TableChangeProcessor.cs
- columnmapfactory.cs
- LiteralControl.cs
- DiagnosticsConfigurationHandler.cs
- LineBreakRecord.cs
- Frame.cs
- ParenthesizePropertyNameAttribute.cs
- ClientBuildManager.cs
- SqlDataSourceQueryEditor.cs
- CookieHandler.cs
- Debug.cs
- EastAsianLunisolarCalendar.cs
- CatalogPartCollection.cs
- SqlNodeAnnotations.cs
- TableLayout.cs
- FileDialog_Vista_Interop.cs
- PerformanceCounterManager.cs
- FigureParagraph.cs
- WorkflowRuntimeServiceElement.cs
- StateBag.cs
- LinearQuaternionKeyFrame.cs
- ValidationError.cs
- BaseValidator.cs
- SiteMapHierarchicalDataSourceView.cs
- Assembly.cs
- DataGridRow.cs
- ServiceModelReg.cs
- BamlResourceSerializer.cs
- XmlDataSource.cs
- SHA384.cs
- MouseDevice.cs
- CurrentChangingEventArgs.cs
- FindResponse.cs
- ConsumerConnectionPoint.cs
- DataGridViewMethods.cs
- Avt.cs
- WebContentFormatHelper.cs
- ActivityDefaults.cs
- DispatcherEventArgs.cs
- TypeToken.cs
- ResourceDictionaryCollection.cs
- DataGridViewBand.cs
- StrokeCollection2.cs
- PenContexts.cs
- OptimizedTemplateContent.cs
- TreeBuilderBamlTranslator.cs
- GatewayIPAddressInformationCollection.cs
- Expressions.cs
- CqlGenerator.cs
- StringAttributeCollection.cs
- ClientFormsAuthenticationMembershipProvider.cs
- Pen.cs
- ChannelServices.cs
- MissingFieldException.cs
- LiteralDesigner.cs
- sqlser.cs
- SessionStateUtil.cs
- MenuEventArgs.cs
- Int16AnimationBase.cs
- EdmItemCollection.cs
- EntityDataSourceValidationException.cs
- SafeBitVector32.cs
- TextControl.cs
- DropSource.cs
- Geometry3D.cs
- ContextMenu.cs
- Line.cs
- IpcChannel.cs
- ContentControl.cs