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
- MulticastNotSupportedException.cs
- GlobalEventManager.cs
- ApplicationException.cs
- OrCondition.cs
- Hashtable.cs
- BaseParaClient.cs
- SharedPerformanceCounter.cs
- GeneralTransform3DGroup.cs
- FixUp.cs
- InkPresenter.cs
- StringResourceManager.cs
- EntityParameter.cs
- ModelVisual3D.cs
- FontResourceCache.cs
- ActionFrame.cs
- VirtualizedCellInfoCollection.cs
- GroupDescription.cs
- DataGridClipboardHelper.cs
- SessionPageStateSection.cs
- ExtensionSimplifierMarkupObject.cs
- RsaSecurityToken.cs
- XsltArgumentList.cs
- RelationshipNavigation.cs
- LoginUtil.cs
- AbstractSvcMapFileLoader.cs
- ProtectedConfigurationSection.cs
- SqlDataRecord.cs
- ListViewCancelEventArgs.cs
- SeparatorAutomationPeer.cs
- Vector3D.cs
- WebPartConnection.cs
- Bidi.cs
- SrgsElementList.cs
- WindowsFormsSynchronizationContext.cs
- StrokeCollectionDefaultValueFactory.cs
- QueryCreatedEventArgs.cs
- SynchronizationContext.cs
- OdbcEnvironment.cs
- RoutedEventConverter.cs
- HandlerWithFactory.cs
- LayoutSettings.cs
- FontDialog.cs
- UnsafeNativeMethodsCLR.cs
- XmlStringTable.cs
- __FastResourceComparer.cs
- HttpDebugHandler.cs
- AttributedMetaModel.cs
- OrderedDictionary.cs
- Int32AnimationBase.cs
- RoutedEventValueSerializer.cs
- Point.cs
- DefaultHttpHandler.cs
- StyleBamlRecordReader.cs
- Lease.cs
- WebDisplayNameAttribute.cs
- TaskScheduler.cs
- BuildDependencySet.cs
- ChannelSinkStacks.cs
- StorageComplexPropertyMapping.cs
- ComplexTypeEmitter.cs
- LazyTextWriterCreator.cs
- ConnectionProviderAttribute.cs
- ColorTransformHelper.cs
- DispatcherHookEventArgs.cs
- UrlMappingsSection.cs
- DiscoveryClientElement.cs
- Dynamic.cs
- ImageMetadata.cs
- bindurihelper.cs
- ScaleTransform.cs
- FormViewCommandEventArgs.cs
- DebugManager.cs
- EntityClientCacheKey.cs
- Line.cs
- MetadataUtilsSmi.cs
- IconConverter.cs
- COM2Properties.cs
- HttpCookie.cs
- NotFiniteNumberException.cs
- VectorKeyFrameCollection.cs
- _LocalDataStoreMgr.cs
- Axis.cs
- TargetParameterCountException.cs
- safelinkcollection.cs
- UnderstoodHeaders.cs
- ObjectViewEntityCollectionData.cs
- QueryContinueDragEvent.cs
- ObjectSelectorEditor.cs
- ConfigXmlSignificantWhitespace.cs
- KoreanCalendar.cs
- XhtmlTextWriter.cs
- QueryRewriter.cs
- Update.cs
- InternalReceiveMessage.cs
- HwndKeyboardInputProvider.cs
- ProcessHost.cs
- ColumnReorderedEventArgs.cs
- WindowHelperService.cs
- DocumentSequence.cs
- EventBuilder.cs