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
- DbDeleteCommandTree.cs
- GeneratedCodeAttribute.cs
- SecurityPolicySection.cs
- SiteMapPath.cs
- FilterRepeater.cs
- Renderer.cs
- TypeBuilderInstantiation.cs
- Configuration.cs
- BuildProvidersCompiler.cs
- Pen.cs
- CodeMethodInvokeExpression.cs
- SmiRequestExecutor.cs
- WebMethodAttribute.cs
- XDRSchema.cs
- ValidationEventArgs.cs
- SizeAnimationBase.cs
- DropSource.cs
- PersistChildrenAttribute.cs
- ConvertEvent.cs
- CounterSampleCalculator.cs
- WorkflowRuntimeEndpoint.cs
- StrongNameUtility.cs
- NodeLabelEditEvent.cs
- TypefaceMetricsCache.cs
- NegotiationTokenAuthenticatorState.cs
- WebAdminConfigurationHelper.cs
- TreeNodeCollection.cs
- SqlMetaData.cs
- NetSectionGroup.cs
- RemoteWebConfigurationHostStream.cs
- BypassElement.cs
- ChannelSinkStacks.cs
- MatrixCamera.cs
- XmlWriterTraceListener.cs
- SafeEventHandle.cs
- WindowsListBox.cs
- MetaTable.cs
- XmlDictionaryString.cs
- followingsibling.cs
- InputLangChangeRequestEvent.cs
- EntitySqlQueryCacheKey.cs
- ToolStripStatusLabel.cs
- CommonXSendMessage.cs
- WhitespaceRuleLookup.cs
- Exceptions.cs
- UTF32Encoding.cs
- OpenTypeLayout.cs
- LineVisual.cs
- SocketElement.cs
- HandleRef.cs
- MappingException.cs
- FileDialog.cs
- AssemblyCollection.cs
- TrackingValidationObjectDictionary.cs
- FixedPage.cs
- MemberAssignment.cs
- Triangle.cs
- UniqueEventHelper.cs
- ControlPaint.cs
- FormParameter.cs
- StylusPointProperties.cs
- SchemaImporterExtension.cs
- FontStyle.cs
- DecimalKeyFrameCollection.cs
- XmlDocumentType.cs
- WebScriptServiceHost.cs
- PhysicalAddress.cs
- DataGridViewCellCancelEventArgs.cs
- XmlAttribute.cs
- ExpandCollapsePatternIdentifiers.cs
- EventSinkHelperWriter.cs
- XamlReaderHelper.cs
- Trace.cs
- XmlDataSourceNodeDescriptor.cs
- Currency.cs
- PrintingPermission.cs
- BufferedWebEventProvider.cs
- DataGridPagerStyle.cs
- GroupBox.cs
- UnorderedHashRepartitionStream.cs
- SchemaMerger.cs
- XamlFilter.cs
- SHA512Managed.cs
- DesignBindingConverter.cs
- WorkflowExecutor.cs
- FormParameter.cs
- CapabilitiesState.cs
- InkPresenterAutomationPeer.cs
- WSSecureConversationDec2005.cs
- AbstractSvcMapFileLoader.cs
- SafeCloseHandleCritical.cs
- ConfigPathUtility.cs
- DataBindingHandlerAttribute.cs
- XmlQualifiedName.cs
- SQLInt64Storage.cs
- CheckedPointers.cs
- Application.cs
- XMLSyntaxException.cs
- Attributes.cs
- ExecutedRoutedEventArgs.cs