Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Runtime / CompilerServices / RuntimeWrappedException.cs / 1 / RuntimeWrappedException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: RuntimeWrappedException ** ** ** Purpose: The exception class uses to wrap all non-CLS compliant exceptions. ** ** =============================================================================*/ namespace System.Runtime.CompilerServices { using System; using System.Runtime.Serialization; using System.Runtime.Remoting; using System.Security.Permissions; [Serializable()] public sealed class RuntimeWrappedException : Exception { private RuntimeWrappedException(Object thrownObject) : base(Environment.GetResourceString("RuntimeWrappedException")) { SetErrorCode(System.__HResults.COR_E_RUNTIMEWRAPPED); m_wrappedException = thrownObject; } public Object WrappedException { get { return m_wrappedException; } } private Object m_wrappedException; [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } base.GetObjectData(info, context); info.AddValue("WrappedException", m_wrappedException, typeof(Object)); } internal RuntimeWrappedException(SerializationInfo info, StreamingContext context) : base(info, context) { m_wrappedException = info.GetValue("WrappedException", typeof(Object)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: RuntimeWrappedException ** ** ** Purpose: The exception class uses to wrap all non-CLS compliant exceptions. ** ** =============================================================================*/ namespace System.Runtime.CompilerServices { using System; using System.Runtime.Serialization; using System.Runtime.Remoting; using System.Security.Permissions; [Serializable()] public sealed class RuntimeWrappedException : Exception { private RuntimeWrappedException(Object thrownObject) : base(Environment.GetResourceString("RuntimeWrappedException")) { SetErrorCode(System.__HResults.COR_E_RUNTIMEWRAPPED); m_wrappedException = thrownObject; } public Object WrappedException { get { return m_wrappedException; } } private Object m_wrappedException; [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } base.GetObjectData(info, context); info.AddValue("WrappedException", m_wrappedException, typeof(Object)); } internal RuntimeWrappedException(SerializationInfo info, StreamingContext context) : base(info, context) { m_wrappedException = info.GetValue("WrappedException", typeof(Object)); } } } // 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
- SpStreamWrapper.cs
- TailPinnedEventArgs.cs
- CoreSwitches.cs
- CroppedBitmap.cs
- DataGridBoolColumn.cs
- TouchDevice.cs
- ClonableStack.cs
- GeometryModel3D.cs
- BaseServiceProvider.cs
- PassportAuthenticationEventArgs.cs
- MimeBasePart.cs
- SerializerDescriptor.cs
- ExchangeUtilities.cs
- NonVisualControlAttribute.cs
- CookieHandler.cs
- WarningException.cs
- TableLayoutSettingsTypeConverter.cs
- DeviceSpecificDesigner.cs
- HashHelper.cs
- HttpContext.cs
- BuilderElements.cs
- PageSetupDialog.cs
- RectAnimationBase.cs
- LocationUpdates.cs
- WebPartDisplayModeCollection.cs
- ElementHostPropertyMap.cs
- HtmlTableRow.cs
- FileDialog.cs
- MachineKeyConverter.cs
- StatusBarAutomationPeer.cs
- LocalTransaction.cs
- WebBrowserSiteBase.cs
- RowUpdatingEventArgs.cs
- ComponentEditorForm.cs
- xmlsaver.cs
- RadioButtonList.cs
- PixelShader.cs
- XmlQueryRuntime.cs
- HttpListenerRequestUriBuilder.cs
- __ConsoleStream.cs
- VariableBinder.cs
- MetricEntry.cs
- DataGridAddNewRow.cs
- StringComparer.cs
- AffineTransform3D.cs
- SizeIndependentAnimationStorage.cs
- AppDomainUnloadedException.cs
- ResourceDisplayNameAttribute.cs
- SecurityKeyIdentifierClause.cs
- WindowsRegion.cs
- ConnectivityStatus.cs
- DataSetMappper.cs
- SelectionChangedEventArgs.cs
- RadioButton.cs
- QuaternionAnimation.cs
- InputMethodStateTypeInfo.cs
- SqlOuterApplyReducer.cs
- OracleTimeSpan.cs
- WindowsStreamSecurityElement.cs
- PropertyMapper.cs
- ContentTextAutomationPeer.cs
- EventSourceCreationData.cs
- ImmComposition.cs
- DataSvcMapFileSerializer.cs
- ChineseLunisolarCalendar.cs
- StateBag.cs
- AddDataControlFieldDialog.cs
- BufferedReadStream.cs
- SqlSelectStatement.cs
- BamlLocalizationDictionary.cs
- DockAndAnchorLayout.cs
- BuildResult.cs
- TreeNodeBindingCollection.cs
- WebPartMenuStyle.cs
- ThreadAbortException.cs
- ObjectConverter.cs
- Polyline.cs
- ProviderConnectionPointCollection.cs
- FunctionGenerator.cs
- BamlReader.cs
- HttpBrowserCapabilitiesBase.cs
- XmlCustomFormatter.cs
- TextSchema.cs
- Pens.cs
- CorrelationResolver.cs
- NonBatchDirectoryCompiler.cs
- SpinLock.cs
- DataGridViewDesigner.cs
- EncryptedData.cs
- PageCodeDomTreeGenerator.cs
- DigestComparer.cs
- CompressStream.cs
- ServicePointManagerElement.cs
- TextBoxBase.cs
- DataObject.cs
- BindingValueChangedEventArgs.cs
- DetailsViewRow.cs
- OrderedEnumerableRowCollection.cs
- ListViewGroup.cs
- Predicate.cs