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
- IconHelper.cs
- DataObjectSettingDataEventArgs.cs
- TrackBarRenderer.cs
- MinMaxParagraphWidth.cs
- BamlTreeMap.cs
- ByteAnimationBase.cs
- XmlSchemaObjectTable.cs
- WebBrowserBase.cs
- _RequestCacheProtocol.cs
- SystemIcons.cs
- ListViewAutomationPeer.cs
- DynamicValidatorEventArgs.cs
- ChannelListenerBase.cs
- JoinElimination.cs
- EditorResources.cs
- ByteStorage.cs
- TypeAccessException.cs
- PublisherMembershipCondition.cs
- SortQuery.cs
- mda.cs
- InProcStateClientManager.cs
- URLIdentityPermission.cs
- PersonalizationProviderHelper.cs
- ObjectManager.cs
- HebrewCalendar.cs
- XDRSchema.cs
- InheritanceContextChangedEventManager.cs
- NameValuePair.cs
- ZipIOExtraFieldZip64Element.cs
- PagesChangedEventArgs.cs
- ObjectDataSourceChooseMethodsPanel.cs
- NativeObjectSecurity.cs
- AssertSection.cs
- DataGridViewRowCancelEventArgs.cs
- HealthMonitoringSectionHelper.cs
- LocalizableResourceBuilder.cs
- PointAnimationUsingKeyFrames.cs
- RawStylusInputReport.cs
- ByteStreamMessageEncodingElement.cs
- ColumnHeaderConverter.cs
- SqlCaseSimplifier.cs
- IdentityNotMappedException.cs
- BooleanConverter.cs
- FormsIdentity.cs
- Object.cs
- AllowedAudienceUriElementCollection.cs
- PropertyPathWorker.cs
- ColumnTypeConverter.cs
- CodeRemoveEventStatement.cs
- UIElement3D.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DateTimeOffsetStorage.cs
- VectorAnimationUsingKeyFrames.cs
- ValidationError.cs
- UpdatePanelControlTrigger.cs
- FloaterParagraph.cs
- ContextMenuService.cs
- BuilderInfo.cs
- UnsafeNativeMethods.cs
- CharAnimationBase.cs
- WindowsEditBox.cs
- UndoManager.cs
- Point3DCollectionConverter.cs
- TargetConverter.cs
- HttpRuntime.cs
- FileLevelControlBuilderAttribute.cs
- CommentEmitter.cs
- SqlDeflator.cs
- AnimatedTypeHelpers.cs
- xamlnodes.cs
- PropertyDescriptors.cs
- XMLDiffLoader.cs
- WasHttpModulesInstallComponent.cs
- WpfWebRequestHelper.cs
- QuaternionAnimation.cs
- UserThread.cs
- KeyFrames.cs
- NativeStructs.cs
- CallbackValidatorAttribute.cs
- SessionPageStateSection.cs
- CreateParams.cs
- ExtendedProtectionPolicyTypeConverter.cs
- TextTreeTextElementNode.cs
- precedingsibling.cs
- AssemblySettingAttributes.cs
- DeleteIndexBinder.cs
- ListCollectionView.cs
- Delay.cs
- QuaternionRotation3D.cs
- Bold.cs
- TimeIntervalCollection.cs
- CollectionContainer.cs
- DataRecordInfo.cs
- HttpCookieCollection.cs
- SqlDependencyUtils.cs
- PropertyGridCommands.cs
- StatusBarAutomationPeer.cs
- HtmlTableCell.cs
- EmptyElement.cs
- TextParagraphCache.cs