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
- IdentityHolder.cs
- CapabilitiesState.cs
- IgnoreFileBuildProvider.cs
- Vars.cs
- BaseValidator.cs
- dbdatarecord.cs
- MonthCalendar.cs
- TreeNodeStyleCollection.cs
- Binding.cs
- SerialPort.cs
- DateTimeStorage.cs
- PeerCustomResolverElement.cs
- SchemaCollectionPreprocessor.cs
- OperatingSystem.cs
- QilInvokeLateBound.cs
- SiteMapDataSource.cs
- TrackingParameters.cs
- Subtract.cs
- RemotingServices.cs
- ItemCheckedEvent.cs
- AuthenticationConfig.cs
- ListSortDescription.cs
- DesignParameter.cs
- HyperLinkField.cs
- UserValidatedEventArgs.cs
- HotSpot.cs
- Pen.cs
- WindowsSysHeader.cs
- ToolStripItemDesigner.cs
- XmlSchemaAttributeGroup.cs
- HMAC.cs
- InOutArgument.cs
- FixedFindEngine.cs
- GACIdentityPermission.cs
- VectorCollectionValueSerializer.cs
- DrawToolTipEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- StringUtil.cs
- IpcClientManager.cs
- RepeatEnumerable.cs
- ScrollEventArgs.cs
- DependencyObjectPropertyDescriptor.cs
- XmlChildNodes.cs
- XmlTextAttribute.cs
- ButtonField.cs
- DocumentApplicationJournalEntry.cs
- DbProviderSpecificTypePropertyAttribute.cs
- DocumentSchemaValidator.cs
- IndexedDataBuffer.cs
- SecurityException.cs
- ParameterCollection.cs
- RegisteredDisposeScript.cs
- TextDecorationCollection.cs
- XPathScanner.cs
- OuterGlowBitmapEffect.cs
- Empty.cs
- ReferenceEqualityComparer.cs
- HtmlObjectListAdapter.cs
- CheckBoxField.cs
- ScrollItemPattern.cs
- GenericEnumerator.cs
- StateMachine.cs
- XmlStreamStore.cs
- DataServiceRequest.cs
- DataControlField.cs
- Visitor.cs
- KeyEventArgs.cs
- SpecialTypeDataContract.cs
- HMACSHA512.cs
- EnvironmentPermission.cs
- TypeUnloadedException.cs
- COM2ComponentEditor.cs
- SystemWebExtensionsSectionGroup.cs
- BrowserTree.cs
- ClientType.cs
- TempFiles.cs
- ObjectQuery_EntitySqlExtensions.cs
- Int32Collection.cs
- NativeRightsManagementAPIsStructures.cs
- SafeBitVector32.cs
- CustomDictionarySources.cs
- SingleTagSectionHandler.cs
- SqlDataSource.cs
- Light.cs
- InstallerTypeAttribute.cs
- DispatcherHooks.cs
- TableLayoutStyle.cs
- DesignSurfaceCollection.cs
- OdbcConnectionStringbuilder.cs
- PrimarySelectionAdorner.cs
- ListViewTableCell.cs
- EntityDataSourceDataSelectionPanel.cs
- DisableDpiAwarenessAttribute.cs
- Input.cs
- CachedFontFace.cs
- TableAdapterManagerNameHandler.cs
- ToolStripLabel.cs
- Tokenizer.cs
- DataControlImageButton.cs
- Soap12ProtocolImporter.cs