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
- Icon.cs
- _TransmitFileOverlappedAsyncResult.cs
- cache.cs
- MultiSelectRootGridEntry.cs
- BinaryFormatterSinks.cs
- SubpageParaClient.cs
- counter.cs
- Vector.cs
- WebPartCancelEventArgs.cs
- TextRange.cs
- DBAsyncResult.cs
- DeclaredTypeValidator.cs
- HtmlInputImage.cs
- Parsers.cs
- OutputCacheSection.cs
- ToolStripSplitButton.cs
- DataBinding.cs
- AddIn.cs
- ParseHttpDate.cs
- HealthMonitoringSection.cs
- unsafenativemethodsother.cs
- AddressHeaderCollection.cs
- ContentControl.cs
- ApplicationTrust.cs
- BamlReader.cs
- StylusCaptureWithinProperty.cs
- Vector.cs
- configsystem.cs
- ToolStripSplitStackLayout.cs
- DesignTimeSiteMapProvider.cs
- SwitchLevelAttribute.cs
- RightsManagementPermission.cs
- KeyPressEvent.cs
- Soap12FormatExtensions.cs
- HttpListenerRequest.cs
- SQLInt32Storage.cs
- ButtonBase.cs
- Script.cs
- ChangePassword.cs
- DataTableMapping.cs
- ListView.cs
- ParameterElementCollection.cs
- OptimizedTemplateContent.cs
- SwitchAttribute.cs
- TemplateParser.cs
- GridItemCollection.cs
- Pointer.cs
- DataGridViewRowHeaderCell.cs
- LayoutSettings.cs
- GroupByExpressionRewriter.cs
- AppDomainAttributes.cs
- CookieHandler.cs
- PrintPageEvent.cs
- SponsorHelper.cs
- EventLogTraceListener.cs
- MethodBuilderInstantiation.cs
- TextTreeRootTextBlock.cs
- TextSearch.cs
- DocumentPaginator.cs
- CompleteWizardStep.cs
- PkcsUtils.cs
- EntryPointNotFoundException.cs
- AssemblyAttributes.cs
- Compensate.cs
- GridToolTip.cs
- CompilationSection.cs
- GrammarBuilderRuleRef.cs
- SelectedDatesCollection.cs
- CodePrimitiveExpression.cs
- PageAdapter.cs
- SelfIssuedAuthRSACryptoProvider.cs
- QilInvokeEarlyBound.cs
- ReferenceConverter.cs
- XmlReflectionMember.cs
- DesigntimeLicenseContextSerializer.cs
- WebBrowserSiteBase.cs
- TextPattern.cs
- HijriCalendar.cs
- TextModifier.cs
- CodeCommentStatementCollection.cs
- PackageStore.cs
- RsaSecurityToken.cs
- PropertyChangeTracker.cs
- SettingsPropertyCollection.cs
- WindowsSspiNegotiation.cs
- ContractsBCL.cs
- HttpListenerException.cs
- MethodBuilderInstantiation.cs
- CreateUserErrorEventArgs.cs
- Point3DKeyFrameCollection.cs
- ClientProxyGenerator.cs
- SocketAddress.cs
- HttpPostServerProtocol.cs
- TransformValueSerializer.cs
- QilInvokeLateBound.cs
- AuthorizationSection.cs
- GeometryDrawing.cs
- UseLicense.cs
- FontStretchConverter.cs
- StickyNoteContentControl.cs