Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ProviderException.cs
- DrawingAttributes.cs
- WebZoneDesigner.cs
- DataGridViewSelectedCellCollection.cs
- DnsPermission.cs
- ChannelServices.cs
- GridViewColumnCollection.cs
- OpenTypeLayout.cs
- WebConfigurationHostFileChange.cs
- ThreadLocal.cs
- InfoCardSymmetricAlgorithm.cs
- SettingsProperty.cs
- ServiceOperationListItemList.cs
- InputScopeConverter.cs
- FormViewUpdateEventArgs.cs
- TableItemPatternIdentifiers.cs
- ElementUtil.cs
- WbmpConverter.cs
- ColorTransformHelper.cs
- HeaderUtility.cs
- GenericEnumConverter.cs
- CallbackDebugBehavior.cs
- NavigationHelper.cs
- ConfigurationException.cs
- TagNameToTypeMapper.cs
- CommandID.cs
- _ListenerRequestStream.cs
- ExtensionWindowResizeGrip.cs
- PeerResolverMode.cs
- XmlSchemaAttributeGroupRef.cs
- MimeMultiPart.cs
- WizardPanel.cs
- XPathSelfQuery.cs
- IsolatedStorage.cs
- GcSettings.cs
- wgx_commands.cs
- UnsafeNativeMethods.cs
- ControlPaint.cs
- ContainerParagraph.cs
- Window.cs
- BuildResultCache.cs
- ListViewDeleteEventArgs.cs
- FloaterParagraph.cs
- OutputCacheSettingsSection.cs
- TransactionFlowAttribute.cs
- TargetException.cs
- Math.cs
- BindingListCollectionView.cs
- WebServiceMethodData.cs
- PersonalizableTypeEntry.cs
- CriticalHandle.cs
- dbdatarecord.cs
- OAVariantLib.cs
- XDRSchema.cs
- OleDbConnectionFactory.cs
- IntPtr.cs
- GatewayDefinition.cs
- WebServicesInteroperability.cs
- GenericUI.cs
- ConnectivityStatus.cs
- InternalRelationshipCollection.cs
- ViewStateModeByIdAttribute.cs
- RuleElement.cs
- WebSysDefaultValueAttribute.cs
- Win32Exception.cs
- DynamicValueConverter.cs
- NameSpaceEvent.cs
- SettingsPropertyCollection.cs
- ByteStreamGeometryContext.cs
- MultipartContentParser.cs
- TextBox.cs
- dbdatarecord.cs
- InlineUIContainer.cs
- MLangCodePageEncoding.cs
- SQLBytesStorage.cs
- Event.cs
- DetailsViewCommandEventArgs.cs
- ChainOfResponsibility.cs
- DbExpressionBuilder.cs
- OleDbCommandBuilder.cs
- Mappings.cs
- NameValueSectionHandler.cs
- _SingleItemRequestCache.cs
- EdmConstants.cs
- DateTimeParse.cs
- ChangeTracker.cs
- BasicExpandProvider.cs
- CompressEmulationStream.cs
- HtmlInputImage.cs
- HandlerFactoryWrapper.cs
- BinaryObjectWriter.cs
- SortQuery.cs
- DataSourceControlBuilder.cs
- IssuedTokenServiceCredential.cs
- SqlConnectionPoolProviderInfo.cs
- SqlTopReducer.cs
- ScopelessEnumAttribute.cs
- ZipIOExtraFieldElement.cs
- DbCommandTree.cs
- TextSelectionProcessor.cs