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
- List.cs
- XmlIterators.cs
- GlobalizationSection.cs
- ScrollViewer.cs
- XsltArgumentList.cs
- OrthographicCamera.cs
- WinEventTracker.cs
- EncoderParameters.cs
- COM2Enum.cs
- XmlSchemas.cs
- DrawTreeNodeEventArgs.cs
- DrawingContextWalker.cs
- ClassHandlersStore.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- CellTreeNode.cs
- XmlAttributeOverrides.cs
- LoginNameDesigner.cs
- ToolBarOverflowPanel.cs
- DBParameter.cs
- XmlSchemaInferenceException.cs
- XmlIncludeAttribute.cs
- WindowsStartMenu.cs
- ProviderSettings.cs
- DataServices.cs
- ObjectSet.cs
- SecurityVersion.cs
- BindMarkupExtensionSerializer.cs
- Hashtable.cs
- XMLSyntaxException.cs
- BaseAppDomainProtocolHandler.cs
- WebPartVerbCollection.cs
- StrongName.cs
- Simplifier.cs
- NativeRightsManagementAPIsStructures.cs
- FixedPageProcessor.cs
- BufferedReadStream.cs
- RangeValuePattern.cs
- WebConfigurationManager.cs
- XmlSchemaComplexContent.cs
- SmiTypedGetterSetter.cs
- ToolBarTray.cs
- WindowAutomationPeer.cs
- URLString.cs
- OrderedHashRepartitionStream.cs
- SelectionItemPattern.cs
- ParentUndoUnit.cs
- ClientType.cs
- AllMembershipCondition.cs
- Helpers.cs
- HMACSHA256.cs
- AdornerLayer.cs
- XmlExpressionDumper.cs
- SolidColorBrush.cs
- TemplatedAdorner.cs
- AttributeCollection.cs
- LabelAutomationPeer.cs
- HwndProxyElementProvider.cs
- KeyPressEvent.cs
- TableColumnCollectionInternal.cs
- StreamUpdate.cs
- ColumnClickEvent.cs
- _FixedSizeReader.cs
- SimpleHandlerFactory.cs
- Empty.cs
- ScrollableControl.cs
- FlowDocumentPaginator.cs
- MetadataArtifactLoader.cs
- EndGetFileNameFromUserRequest.cs
- QuaternionAnimation.cs
- HelloMessageApril2005.cs
- CryptoApi.cs
- SystemSounds.cs
- EdgeProfileValidation.cs
- SerializerWriterEventHandlers.cs
- HttpResponseInternalWrapper.cs
- Ipv6Element.cs
- XmlNullResolver.cs
- TagElement.cs
- DecimalAnimationBase.cs
- ExpandedProjectionNode.cs
- HttpCachePolicyWrapper.cs
- ChtmlPhoneCallAdapter.cs
- NetworkInterface.cs
- WindowInteropHelper.cs
- AnnotationDocumentPaginator.cs
- EventLogPermissionEntry.cs
- XmlName.cs
- DataViewListener.cs
- BasicHttpSecurity.cs
- LifetimeServices.cs
- ApplyTemplatesAction.cs
- TdsParserStateObject.cs
- ConsumerConnectionPoint.cs
- XmlRawWriter.cs
- HtmlGenericControl.cs
- ConsoleTraceListener.cs
- BinaryCommonClasses.cs
- FileRecordSequenceHelper.cs
- SourceChangedEventArgs.cs
- BitmapEffectCollection.cs