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
- Util.cs
- AspNetSynchronizationContext.cs
- XmlChildNodes.cs
- HtmlInputImage.cs
- WrapperEqualityComparer.cs
- XmlILAnnotation.cs
- CacheOutputQuery.cs
- Converter.cs
- HostedAspNetEnvironment.cs
- CaseInsensitiveOrdinalStringComparer.cs
- _NetRes.cs
- DBSchemaTable.cs
- BaseCodePageEncoding.cs
- WindowsFormsHostPropertyMap.cs
- DecoderNLS.cs
- COM2ExtendedBrowsingHandler.cs
- PersonalizationAdministration.cs
- PtsContext.cs
- UInt16.cs
- Oid.cs
- NamedPipeDuplicateContext.cs
- AggregateNode.cs
- HMACSHA384.cs
- TabControlAutomationPeer.cs
- TypeLoader.cs
- WindowsMenu.cs
- RegexFCD.cs
- SymbolType.cs
- InkCanvasSelectionAdorner.cs
- GridViewUpdateEventArgs.cs
- FlowLayoutSettings.cs
- PropertyMap.cs
- Button.cs
- Rfc2898DeriveBytes.cs
- DataGridViewCellStyleConverter.cs
- CodeNamespaceImportCollection.cs
- SqlProcedureAttribute.cs
- StringFreezingAttribute.cs
- PageCatalogPartDesigner.cs
- sitestring.cs
- XmlSchemaImporter.cs
- EnumValAlphaComparer.cs
- RedBlackList.cs
- CellParaClient.cs
- FrameworkContentElementAutomationPeer.cs
- ConnectionManagementElement.cs
- TextAutomationPeer.cs
- DropDownButton.cs
- AuthStoreRoleProvider.cs
- StopStoryboard.cs
- Vector.cs
- ExtentCqlBlock.cs
- BuildDependencySet.cs
- UnsafePeerToPeerMethods.cs
- DataRelation.cs
- SqlStream.cs
- SecurityElement.cs
- TypeBuilder.cs
- DataGridViewCheckBoxColumn.cs
- ConfigurationLocation.cs
- TabItemAutomationPeer.cs
- BamlRecords.cs
- DateTime.cs
- TraceUtils.cs
- TagNameToTypeMapper.cs
- WebBaseEventKeyComparer.cs
- MetadataStore.cs
- WebPartAuthorizationEventArgs.cs
- GridViewEditEventArgs.cs
- ButtonField.cs
- BindingExpressionBase.cs
- DesignerLoader.cs
- CodeDefaultValueExpression.cs
- InlineCategoriesDocument.cs
- HttpListenerResponse.cs
- BinarySerializer.cs
- DataSourceComponent.cs
- DiagnosticEventProvider.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- RelatedPropertyManager.cs
- TriggerAction.cs
- Baml2006Reader.cs
- DataTable.cs
- LocalizedNameDescriptionPair.cs
- ISAPIWorkerRequest.cs
- Pair.cs
- cryptoapiTransform.cs
- ServerIdentity.cs
- BitmapPalette.cs
- AspNetCompatibilityRequirementsMode.cs
- DatePickerDateValidationErrorEventArgs.cs
- ConfigXmlElement.cs
- ScrollEvent.cs
- WebControl.cs
- PropertyDescriptorCollection.cs
- InternalCache.cs
- DataServiceRequest.cs
- XmlBinaryReader.cs
- DataGridParentRows.cs
- SemanticResultKey.cs