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
- NamespaceEmitter.cs
- ToolStripSeparatorRenderEventArgs.cs
- SignatureHelper.cs
- Attributes.cs
- FunctionDescription.cs
- HScrollProperties.cs
- MimeObjectFactory.cs
- EntityCommandDefinition.cs
- DoubleCollectionConverter.cs
- DesignerHost.cs
- EventData.cs
- OrderedDictionary.cs
- URLString.cs
- GenericNameHandler.cs
- TypeUnloadedException.cs
- NegatedConstant.cs
- IconHelper.cs
- AdornerPresentationContext.cs
- Invariant.cs
- ContentFileHelper.cs
- SafePointer.cs
- TextDecorationLocationValidation.cs
- WebHeaderCollection.cs
- LocatorBase.cs
- EntityDataSourceSelectedEventArgs.cs
- Listen.cs
- Query.cs
- DbConnectionFactory.cs
- RegularExpressionValidator.cs
- ReferenceSchema.cs
- ReaderContextStackData.cs
- EventLogLink.cs
- TextDecorations.cs
- Setter.cs
- OutputCacheSettings.cs
- SpinLock.cs
- Type.cs
- CapabilitiesSection.cs
- TypeDescriptor.cs
- UrlMappingsModule.cs
- ImageListStreamer.cs
- PermissionSet.cs
- MatrixValueSerializer.cs
- SourceFilter.cs
- Menu.cs
- ValidateNames.cs
- HealthMonitoringSectionHelper.cs
- XmlSchemaAttribute.cs
- OpacityConverter.cs
- QuadraticEase.cs
- TemplateControlParser.cs
- SqlReferenceCollection.cs
- EntityClientCacheEntry.cs
- SocketPermission.cs
- DBCommand.cs
- ApplicationCommands.cs
- ListManagerBindingsCollection.cs
- ParameterExpression.cs
- FixUp.cs
- Misc.cs
- DataBindingExpressionBuilder.cs
- LocalizationParserHooks.cs
- Claim.cs
- WrappedKeySecurityTokenParameters.cs
- PropertyValueEditor.cs
- EntityDataSourceMemberPath.cs
- TracedNativeMethods.cs
- WindowsFormsHostPropertyMap.cs
- DependencyPropertyValueSerializer.cs
- ExtractedStateEntry.cs
- SecurityStandardsManager.cs
- Thickness.cs
- Constants.cs
- ManagedWndProcTracker.cs
- SiteMapNode.cs
- HttpStreams.cs
- EnumValidator.cs
- JavaScriptSerializer.cs
- IChannel.cs
- DataGridViewCell.cs
- DataGridColumnHeaderAutomationPeer.cs
- SecurityUniqueId.cs
- MarkupCompiler.cs
- ColorPalette.cs
- ConnectionDemuxer.cs
- SystemSounds.cs
- webeventbuffer.cs
- SurrogateEncoder.cs
- ProgressBar.cs
- _ShellExpression.cs
- SchemaContext.cs
- MediaCommands.cs
- DrawingAttributeSerializer.cs
- AutomationElement.cs
- DocumentSchemaValidator.cs
- CalloutQueueItem.cs
- BitmapEffectDrawing.cs
- IteratorFilter.cs
- DataTemplateSelector.cs
- StreamGeometry.cs