Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ToolStripOverflowButton.cs
- ReadOnlyHierarchicalDataSource.cs
- ReadOnlyCollectionBase.cs
- HuffModule.cs
- CompleteWizardStep.cs
- Command.cs
- BamlTreeMap.cs
- DrawingCollection.cs
- FloatAverageAggregationOperator.cs
- TextChangedEventArgs.cs
- IPAddressCollection.cs
- WindowsIdentity.cs
- PropertyGroupDescription.cs
- OverflowException.cs
- RegistrySecurity.cs
- TextFormatter.cs
- InvalidCastException.cs
- HtmlTableCell.cs
- WasHostedComPlusFactory.cs
- Primitive.cs
- hwndwrapper.cs
- SQlBooleanStorage.cs
- SystemWebSectionGroup.cs
- Operators.cs
- AssociatedControlConverter.cs
- XamlInt32CollectionSerializer.cs
- MobileControlsSectionHandler.cs
- CacheAxisQuery.cs
- Permission.cs
- ImageBrush.cs
- newinstructionaction.cs
- RelatedCurrencyManager.cs
- Page.cs
- ModulesEntry.cs
- WebExceptionStatus.cs
- MouseEvent.cs
- ReverseInheritProperty.cs
- ISSmlParser.cs
- CachedRequestParams.cs
- RealProxy.cs
- ReflectionHelper.cs
- XmlAnyElementAttribute.cs
- Size3D.cs
- XmlRawWriter.cs
- HwndProxyElementProvider.cs
- SqlDataSourceCache.cs
- SpeakCompletedEventArgs.cs
- FileSystemEnumerable.cs
- LabelLiteral.cs
- MDIClient.cs
- FullTextState.cs
- PackagePart.cs
- control.ime.cs
- BinaryKeyIdentifierClause.cs
- AbsoluteQuery.cs
- InheritanceContextHelper.cs
- NativeCppClassAttribute.cs
- MarkupExtensionParser.cs
- ServerReliableChannelBinder.cs
- AsyncSerializedWorker.cs
- DynamicDataExtensions.cs
- DeviceFiltersSection.cs
- DataComponentMethodGenerator.cs
- KeySplineConverter.cs
- Style.cs
- InputEventArgs.cs
- InstanceCreationEditor.cs
- WindowsUpDown.cs
- TextElementCollectionHelper.cs
- CopyNodeSetAction.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- BroadcastEventHelper.cs
- DecimalAnimationBase.cs
- ButtonFieldBase.cs
- CssStyleCollection.cs
- TargetInvocationException.cs
- DataViewManager.cs
- TableLayoutPanelResizeGlyph.cs
- HttpCookiesSection.cs
- ControlAdapter.cs
- ProtocolsSection.cs
- ValidationSummary.cs
- DataGridColumnDropSeparator.cs
- HealthMonitoringSectionHelper.cs
- EdmScalarPropertyAttribute.cs
- _ListenerAsyncResult.cs
- XmlHierarchicalDataSourceView.cs
- CommandID.cs
- BindingListCollectionView.cs
- InternalTypeHelper.cs
- BufferBuilder.cs
- OutputCacheProfile.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- NamedPipeChannelListener.cs
- DecoderReplacementFallback.cs
- ReflectionTypeLoadException.cs
- FontEmbeddingManager.cs
- storagemappingitemcollection.viewdictionary.cs
- FunctionQuery.cs
- TypedReference.cs