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
- Point3DAnimationUsingKeyFrames.cs
- MailBnfHelper.cs
- RecordsAffectedEventArgs.cs
- AttributeCollection.cs
- XmlException.cs
- ObjectDataSource.cs
- Inflater.cs
- WSIdentityFaultException.cs
- SignedXml.cs
- LineServicesCallbacks.cs
- Models.cs
- IteratorFilter.cs
- EdmSchemaError.cs
- ThreadWorkerController.cs
- ProcessThreadCollection.cs
- UriWriter.cs
- DispatcherTimer.cs
- DecimalAnimationBase.cs
- WebControlAdapter.cs
- SetStoryboardSpeedRatio.cs
- ToolBarButton.cs
- ValidatorCompatibilityHelper.cs
- Decorator.cs
- XmlUtilWriter.cs
- ActiveXHelper.cs
- DataBoundControlAdapter.cs
- TouchesOverProperty.cs
- TranslateTransform.cs
- AttachedPropertiesService.cs
- SwitchElementsCollection.cs
- TextRangeEdit.cs
- SystemResources.cs
- ExplicitDiscriminatorMap.cs
- XmlWriterTraceListener.cs
- GlobalEventManager.cs
- UserUseLicenseDictionaryLoader.cs
- RefreshPropertiesAttribute.cs
- ServiceOperationUIEditor.cs
- UnsafePeerToPeerMethods.cs
- InputProcessorProfiles.cs
- AttributeProviderAttribute.cs
- followingsibling.cs
- SymbolMethod.cs
- UpDownBase.cs
- SQLMoney.cs
- MonitorWrapper.cs
- TCPListener.cs
- regiisutil.cs
- MonthChangedEventArgs.cs
- StyleXamlParser.cs
- OleDbRowUpdatedEvent.cs
- TagPrefixCollection.cs
- SqlCacheDependencyDatabaseCollection.cs
- PropertyTab.cs
- XmlHierarchyData.cs
- VectorCollection.cs
- SqlFactory.cs
- util.cs
- ManipulationDeltaEventArgs.cs
- DeploymentSectionCache.cs
- ReflectPropertyDescriptor.cs
- StructureChangedEventArgs.cs
- cookiecontainer.cs
- FormParameter.cs
- SchemaImporterExtensionsSection.cs
- NativeMethods.cs
- XmlElementList.cs
- OletxVolatileEnlistment.cs
- SoapSchemaMember.cs
- ClientBuildManagerCallback.cs
- ExternalException.cs
- CrossAppDomainChannel.cs
- Listbox.cs
- DiscoveryClientRequestChannel.cs
- Expander.cs
- WebConfigurationHost.cs
- AncillaryOps.cs
- DiscoveryClientDuplexChannel.cs
- contentDescriptor.cs
- AsnEncodedData.cs
- UIPermission.cs
- ShaderRenderModeValidation.cs
- Subtract.cs
- GeometryModel3D.cs
- RawStylusActions.cs
- CommandHelper.cs
- TypeInitializationException.cs
- NamedObjectList.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- XPathSelfQuery.cs
- MaskedTextBoxDesigner.cs
- FrameworkTextComposition.cs
- XsdCachingReader.cs
- versioninfo.cs
- SectionInformation.cs
- PerformanceCounterLib.cs
- DataGridColumnHeadersPresenter.cs
- TextTreeFixupNode.cs
- NameValueFileSectionHandler.cs
- VectorCollectionConverter.cs