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 / DBConcurrencyException.cs / 1 / DBConcurrencyException.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Globalization; using System.Runtime.Serialization; [Serializable] #if WINFSInternalOnly internal #else public #endif sealed class DBConcurrencyException : SystemException { private DataRow[] _dataRows; public DBConcurrencyException() : this(Res.GetString(Res.ADP_DBConcurrencyExceptionMessage), null) { // MDAC 84941 } public DBConcurrencyException(string message) : this(message, null) { } public DBConcurrencyException(string message, Exception inner) : base(message, inner) { HResult = HResults.DBConcurrency; // MDAC 84941 } public DBConcurrencyException(string message, Exception inner, DataRow[] dataRows) : base(message, inner) { HResult = HResults.DBConcurrency; // MDAC 84941 _dataRows = dataRows; } // runtime will call even if private... private DBConcurrencyException(SerializationInfo si, StreamingContext sc) : base(si, sc) { // dataRow = (DataRow) si.GetValue("dataRow", typeof(DataRow)); - do not do this till v.next with serialization support for DataRow. MDAC 72136 } [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] override public void GetObjectData(SerializationInfo si, StreamingContext context) { // MDAC 72003 if (null == si) { throw new ArgumentNullException("si"); } // si.AddValue("dataRow", dataRow, typeof(DataRow)); - do not do this till v.next with serialization support for DataRow. MDAC 72136 base.GetObjectData(si, context); } public DataRow Row { // MDAC 55735 get { DataRow[] rows = _dataRows; return (((null != rows) && (0 < rows.Length)) ? rows[0] : null); } set { _dataRows = new DataRow[1] { value }; } } public int RowCount { get { DataRow[] dataRows = _dataRows; return ((null != dataRows) ? dataRows.Length : 0); } } public void CopyToRows(DataRow[] array) { CopyToRows(array, 0); } public void CopyToRows(DataRow[] array, int arrayIndex) { DataRow[] dataRows = _dataRows; if (null != dataRows) { dataRows.CopyTo(array, arrayIndex); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Globalization; using System.Runtime.Serialization; [Serializable] #if WINFSInternalOnly internal #else public #endif sealed class DBConcurrencyException : SystemException { private DataRow[] _dataRows; public DBConcurrencyException() : this(Res.GetString(Res.ADP_DBConcurrencyExceptionMessage), null) { // MDAC 84941 } public DBConcurrencyException(string message) : this(message, null) { } public DBConcurrencyException(string message, Exception inner) : base(message, inner) { HResult = HResults.DBConcurrency; // MDAC 84941 } public DBConcurrencyException(string message, Exception inner, DataRow[] dataRows) : base(message, inner) { HResult = HResults.DBConcurrency; // MDAC 84941 _dataRows = dataRows; } // runtime will call even if private... private DBConcurrencyException(SerializationInfo si, StreamingContext sc) : base(si, sc) { // dataRow = (DataRow) si.GetValue("dataRow", typeof(DataRow)); - do not do this till v.next with serialization support for DataRow. MDAC 72136 } [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] override public void GetObjectData(SerializationInfo si, StreamingContext context) { // MDAC 72003 if (null == si) { throw new ArgumentNullException("si"); } // si.AddValue("dataRow", dataRow, typeof(DataRow)); - do not do this till v.next with serialization support for DataRow. MDAC 72136 base.GetObjectData(si, context); } public DataRow Row { // MDAC 55735 get { DataRow[] rows = _dataRows; return (((null != rows) && (0 < rows.Length)) ? rows[0] : null); } set { _dataRows = new DataRow[1] { value }; } } public int RowCount { get { DataRow[] dataRows = _dataRows; return ((null != dataRows) ? dataRows.Length : 0); } } public void CopyToRows(DataRow[] array) { CopyToRows(array, 0); } public void CopyToRows(DataRow[] array, int arrayIndex) { DataRow[] dataRows = _dataRows; if (null != dataRows) { dataRows.CopyTo(array, arrayIndex); } } } } // 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
- SingleTagSectionHandler.cs
- DataObject.cs
- UInt64Converter.cs
- Section.cs
- ObjectFullSpanRewriter.cs
- SafeFileMappingHandle.cs
- ToolStripContentPanel.cs
- PrintingPermissionAttribute.cs
- Visitor.cs
- HttpRequest.cs
- WriteFileContext.cs
- Clock.cs
- NumericUpDownAccelerationCollection.cs
- UpWmlMobileTextWriter.cs
- SmiEventSink_Default.cs
- CompleteWizardStep.cs
- DbCommandDefinition.cs
- SystemResourceHost.cs
- SectionInformation.cs
- InlineCollection.cs
- TextParagraph.cs
- AttributedMetaModel.cs
- PartialTrustHelpers.cs
- FloatUtil.cs
- UndoEngine.cs
- QualificationDataItem.cs
- ButtonStandardAdapter.cs
- ChangeBlockUndoRecord.cs
- AssemblyAssociatedContentFileAttribute.cs
- DataException.cs
- AnnotationHelper.cs
- Variant.cs
- QilFunction.cs
- cache.cs
- ParallelEnumerableWrapper.cs
- FindSimilarActivitiesVerb.cs
- RenderDataDrawingContext.cs
- AnnotationMap.cs
- FileDialogPermission.cs
- OdbcConnection.cs
- ImportContext.cs
- SchemaInfo.cs
- ComponentResourceManager.cs
- objectresult_tresulttype.cs
- TreeViewAutomationPeer.cs
- MobileComponentEditorPage.cs
- EntityDataSourceWrapperCollection.cs
- StreamGeometryContext.cs
- WhiteSpaceTrimStringConverter.cs
- SystemEvents.cs
- Encoding.cs
- Not.cs
- InstancePersistenceContext.cs
- PropertyMappingExceptionEventArgs.cs
- ColumnClickEvent.cs
- LongValidatorAttribute.cs
- UniqueIdentifierService.cs
- EnvelopeVersion.cs
- HttpWebResponse.cs
- EnterpriseServicesHelper.cs
- XmlCharCheckingReader.cs
- ConditionedDesigner.cs
- WebPartTransformerAttribute.cs
- MenuItemAutomationPeer.cs
- TcpSocketManager.cs
- PaintEvent.cs
- SettingsPropertyValueCollection.cs
- FileDialogCustomPlaces.cs
- IsolatedStorageFile.cs
- ArrayWithOffset.cs
- ManualResetEvent.cs
- NetworkAddressChange.cs
- CodePageUtils.cs
- ChildDocumentBlock.cs
- ExtentCqlBlock.cs
- FormatterConverter.cs
- ManualResetEventSlim.cs
- SecurityCriticalDataForSet.cs
- XmlStringTable.cs
- DataGridTablesFactory.cs
- COAUTHIDENTITY.cs
- PrinterSettings.cs
- _IPv6Address.cs
- InputScopeConverter.cs
- PrefixQName.cs
- SecUtil.cs
- SafeNativeMethodsMilCoreApi.cs
- CompileXomlTask.cs
- HttpRuntimeSection.cs
- PropertyTabChangedEvent.cs
- BamlRecordHelper.cs
- DataBoundLiteralControl.cs
- TypeListConverter.cs
- DragCompletedEventArgs.cs
- RectAnimation.cs
- SqlTriggerAttribute.cs
- PropertyConverter.cs
- ServiceModelConfigurationSectionCollection.cs
- CodeAccessPermission.cs
- UniqueEventHelper.cs