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
- DataGridViewRowConverter.cs
- ListDictionary.cs
- InvalidComObjectException.cs
- CssClassPropertyAttribute.cs
- XmlUtf8RawTextWriter.cs
- StyleHelper.cs
- Drawing.cs
- SwitchAttribute.cs
- NamespaceInfo.cs
- WebPartEditorOkVerb.cs
- Border.cs
- SystemMulticastIPAddressInformation.cs
- ComboBoxAutomationPeer.cs
- XmlSchemaValidator.cs
- DeadCharTextComposition.cs
- BindingCollection.cs
- PropertyDescriptorCollection.cs
- RawMouseInputReport.cs
- StorageMappingFragment.cs
- Help.cs
- DocumentViewer.cs
- MailBnfHelper.cs
- ZoneIdentityPermission.cs
- Root.cs
- XamlTemplateSerializer.cs
- SqlFormatter.cs
- SessionEndingEventArgs.cs
- OdbcEnvironmentHandle.cs
- ClusterRegistryConfigurationProvider.cs
- PlanCompilerUtil.cs
- CharacterBuffer.cs
- KeyManager.cs
- OracleDataAdapter.cs
- FormsAuthenticationTicket.cs
- CharStorage.cs
- ValidationHelper.cs
- EdmFunctionAttribute.cs
- Component.cs
- OdbcTransaction.cs
- UnsafeNativeMethods.cs
- BaseAddressPrefixFilterElement.cs
- GridSplitterAutomationPeer.cs
- CatalogPartChrome.cs
- BuildProvider.cs
- Geometry3D.cs
- SchemaNotation.cs
- Int16Storage.cs
- UrlParameterWriter.cs
- CustomError.cs
- InstanceData.cs
- UniqueIdentifierService.cs
- KeyBinding.cs
- ExplicitDiscriminatorMap.cs
- ScriptControlManager.cs
- KeyValuePairs.cs
- COM2PropertyBuilderUITypeEditor.cs
- ConfigurationValues.cs
- RelatedPropertyManager.cs
- CheckBoxAutomationPeer.cs
- ResetableIterator.cs
- ToolStripLabel.cs
- SwitchLevelAttribute.cs
- LogLogRecord.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ProcessThreadDesigner.cs
- NextPreviousPagerField.cs
- XmlnsPrefixAttribute.cs
- XmlNotation.cs
- AnimatedTypeHelpers.cs
- OverlappedAsyncResult.cs
- RuntimeConfigLKG.cs
- XmlSchema.cs
- SvcMapFile.cs
- PropertyChangedEventArgs.cs
- UrlPath.cs
- Rss20FeedFormatter.cs
- PrePostDescendentsWalker.cs
- OleDbParameter.cs
- DecimalAnimation.cs
- AsyncOperationManager.cs
- RequestContext.cs
- GetPageNumberCompletedEventArgs.cs
- XmlComment.cs
- XmlSchemaComplexContent.cs
- RC2.cs
- TypeDelegator.cs
- SortExpressionBuilder.cs
- ObjectTag.cs
- SoapInteropTypes.cs
- StagingAreaInputItem.cs
- WebBrowserNavigatingEventHandler.cs
- IPAddressCollection.cs
- DbConnectionFactory.cs
- CodeThrowExceptionStatement.cs
- RolePrincipal.cs
- GAC.cs
- shaperfactoryquerycachekey.cs
- LogWriteRestartAreaAsyncResult.cs
- HttpApplicationStateWrapper.cs
- MasterPageParser.cs