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
- SoapServerMethod.cs
- XamlWriter.cs
- Base64Decoder.cs
- BinaryEditor.cs
- DependentList.cs
- TrackPoint.cs
- RectAnimationBase.cs
- PageRequestManager.cs
- __FastResourceComparer.cs
- StylusDevice.cs
- InternalsVisibleToAttribute.cs
- Int32CollectionConverter.cs
- DefaultProfileManager.cs
- ObjectMemberMapping.cs
- RijndaelManaged.cs
- ForwardPositionQuery.cs
- SQLSingleStorage.cs
- WebBrowser.cs
- PropertySourceInfo.cs
- SymmetricSecurityProtocolFactory.cs
- WindowVisualStateTracker.cs
- TemplateManager.cs
- LocalBuilder.cs
- TypedAsyncResult.cs
- ProfileBuildProvider.cs
- SqlFileStream.cs
- MessageQueueAccessControlEntry.cs
- ServiceObjectContainer.cs
- ToolStripOverflow.cs
- XamlStackWriter.cs
- UrlSyndicationContent.cs
- CheckedPointers.cs
- AxisAngleRotation3D.cs
- SafePEFileHandle.cs
- ComPlusAuthorization.cs
- ExpressionEvaluator.cs
- PackageDigitalSignatureManager.cs
- ResXDataNode.cs
- DataTableReaderListener.cs
- HighlightVisual.cs
- DbSetClause.cs
- InheritanceContextHelper.cs
- OutputWindow.cs
- BitmapEffectDrawingContextWalker.cs
- shaperfactory.cs
- Grant.cs
- XmlWriter.cs
- SplitterCancelEvent.cs
- AutomationElement.cs
- regiisutil.cs
- LocalValueEnumerator.cs
- OleDbFactory.cs
- DependencyPropertyChangedEventArgs.cs
- TemplateNodeContextMenu.cs
- SudsWriter.cs
- XmlNullResolver.cs
- ContextConfiguration.cs
- RectangleF.cs
- DateRangeEvent.cs
- EventBuilder.cs
- TargetInvocationException.cs
- FieldNameLookup.cs
- linebase.cs
- BamlStream.cs
- ApplicationGesture.cs
- TableMethodGenerator.cs
- FragmentQueryProcessor.cs
- FullTextBreakpoint.cs
- NaturalLanguageHyphenator.cs
- ExpressionVisitorHelpers.cs
- Hex.cs
- TextDecorationCollection.cs
- NetTcpSecurityElement.cs
- ImmutableObjectAttribute.cs
- UnmanagedMemoryStreamWrapper.cs
- WaitingCursor.cs
- ButtonAutomationPeer.cs
- LOSFormatter.cs
- DetailsViewRow.cs
- DbModificationClause.cs
- HttpCacheVaryByContentEncodings.cs
- wgx_sdk_version.cs
- ServiceThrottlingElement.cs
- CapabilitiesRule.cs
- CfgParser.cs
- QilNode.cs
- PageCache.cs
- MethodBuilderInstantiation.cs
- SqlUtils.cs
- ActivityTypeResolver.xaml.cs
- SiteMap.cs
- UpdateManifestForBrowserApplication.cs
- AsmxEndpointPickerExtension.cs
- Crc32.cs
- BinHexDecoder.cs
- Math.cs
- XmlValidatingReaderImpl.cs
- ApplicationException.cs
- CodeFieldReferenceExpression.cs
- TraceLevelStore.cs