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
- DataTableMapping.cs
- controlskin.cs
- LayoutTable.cs
- SafeFindHandle.cs
- HtmlInputReset.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- XamlContextStack.cs
- CodeGeneratorOptions.cs
- CommandEventArgs.cs
- XmlSchemaSequence.cs
- SingleSelectRootGridEntry.cs
- BulletedList.cs
- WindowsGrip.cs
- HttpHandlerActionCollection.cs
- BitmapDecoder.cs
- OdbcConnectionPoolProviderInfo.cs
- WindowsAuthenticationModule.cs
- SpellerHighlightLayer.cs
- RijndaelManagedTransform.cs
- CursorInteropHelper.cs
- DaylightTime.cs
- SettingsBindableAttribute.cs
- DragEvent.cs
- SharedPersonalizationStateInfo.cs
- MemberRelationshipService.cs
- SevenBitStream.cs
- DataGridCommandEventArgs.cs
- DifferencingCollection.cs
- WebPartCancelEventArgs.cs
- ConfigXmlAttribute.cs
- HttpTransportSecurityElement.cs
- BaseCodeDomTreeGenerator.cs
- EdmEntityTypeAttribute.cs
- Content.cs
- WinEventHandler.cs
- ObjectDataSourceFilteringEventArgs.cs
- RectAnimationClockResource.cs
- ArrayElementGridEntry.cs
- CallbackHandler.cs
- SQLStringStorage.cs
- UniqueConstraint.cs
- MeasureData.cs
- LineServicesRun.cs
- EntityTypeBase.cs
- HttpCapabilitiesEvaluator.cs
- ObjectItemLoadingSessionData.cs
- DocumentAutomationPeer.cs
- NeutralResourcesLanguageAttribute.cs
- IsolatedStorageFileStream.cs
- SQLBinary.cs
- RegexReplacement.cs
- ZipArchive.cs
- SettingsSection.cs
- WebHeaderCollection.cs
- ShaderEffect.cs
- UserPreferenceChangingEventArgs.cs
- AttachmentService.cs
- CodeAssignStatement.cs
- SByteStorage.cs
- DetailsView.cs
- ValidatingReaderNodeData.cs
- CompModSwitches.cs
- ToolStripDropDownDesigner.cs
- ResourceExpressionEditor.cs
- ServiceNameCollection.cs
- EncryptedPackage.cs
- CacheMemory.cs
- ExtensibleClassFactory.cs
- CommandDevice.cs
- DbgUtil.cs
- FileSystemInfo.cs
- PeerDuplexChannel.cs
- UdpSocketReceiveManager.cs
- Base64Stream.cs
- Rectangle.cs
- PeerNameResolver.cs
- ContractsBCL.cs
- FlowchartDesigner.xaml.cs
- SemanticResultValue.cs
- LogicalMethodInfo.cs
- WizardPanelChangingEventArgs.cs
- SrgsRuleRef.cs
- ConfigurationStrings.cs
- SynchronizingStream.cs
- UrlMappingCollection.cs
- FixedSOMGroup.cs
- DynamicQueryableWrapper.cs
- GridViewCellAutomationPeer.cs
- UrlPropertyAttribute.cs
- XsltException.cs
- GenericEnumerator.cs
- WarningException.cs
- RenderOptions.cs
- TokenFactoryBase.cs
- AnonymousIdentificationSection.cs
- Timer.cs
- input.cs
- WorkflowTraceTransfer.cs
- SoapFault.cs
- TextDecorationCollection.cs