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
- ParseElement.cs
- SecurityManager.cs
- ToolBar.cs
- DefaultWorkflowTransactionService.cs
- StylusTip.cs
- WhiteSpaceTrimStringConverter.cs
- MultiByteCodec.cs
- SqlNotificationEventArgs.cs
- RelationshipDetailsRow.cs
- WindowsGraphics.cs
- PrintPreviewControl.cs
- DataGridViewCellConverter.cs
- EdmItemError.cs
- CodeSubDirectoriesCollection.cs
- RawKeyboardInputReport.cs
- CodeTypeReferenceExpression.cs
- arc.cs
- OletxTransactionHeader.cs
- ErrorFormatterPage.cs
- StateWorkerRequest.cs
- AnnotationHelper.cs
- JsonGlobals.cs
- IdentityNotMappedException.cs
- BStrWrapper.cs
- AuthenticationModulesSection.cs
- HttpPostClientProtocol.cs
- MultiViewDesigner.cs
- ModuleElement.cs
- GZipDecoder.cs
- Int64AnimationUsingKeyFrames.cs
- SmtpNetworkElement.cs
- SqlDataReader.cs
- ScrollBarRenderer.cs
- TextInfo.cs
- WindowsListViewItemCheckBox.cs
- FieldAccessException.cs
- XmlHelper.cs
- TargetPerspective.cs
- LocationUpdates.cs
- DeviceContext2.cs
- SendingRequestEventArgs.cs
- CacheEntry.cs
- BulletDecorator.cs
- StaticSiteMapProvider.cs
- CapabilitiesRule.cs
- HttpContextWrapper.cs
- DependencyPropertyValueSerializer.cs
- X509RawDataKeyIdentifierClause.cs
- TcpProcessProtocolHandler.cs
- FontDialog.cs
- CancelEventArgs.cs
- DataControlExtensions.cs
- HMACSHA256.cs
- LoginNameDesigner.cs
- CommonRemoteMemoryBlock.cs
- OleDbRowUpdatedEvent.cs
- JsonQNameDataContract.cs
- CharacterBufferReference.cs
- ParallelEnumerableWrapper.cs
- PropertyDescriptors.cs
- EncodedStreamFactory.cs
- ButtonChrome.cs
- TimeEnumHelper.cs
- TextProviderWrapper.cs
- SqlHelper.cs
- XmlResolver.cs
- RadioButtonList.cs
- WindowsGraphicsCacheManager.cs
- CheckBoxRenderer.cs
- SharedConnectionInfo.cs
- SqlServer2KCompatibilityCheck.cs
- MasterPage.cs
- PersistChildrenAttribute.cs
- GridSplitter.cs
- MethodBuilder.cs
- RecognizerInfo.cs
- XmlEncodedRawTextWriter.cs
- EFAssociationProvider.cs
- RadioButtonAutomationPeer.cs
- DataRecordInternal.cs
- TraceEventCache.cs
- DatasetMethodGenerator.cs
- EventToken.cs
- FormViewUpdateEventArgs.cs
- ExpressionWriter.cs
- OledbConnectionStringbuilder.cs
- BadImageFormatException.cs
- ListView.cs
- ClientUrlResolverWrapper.cs
- DocumentPageView.cs
- Stacktrace.cs
- ProgressiveCrcCalculatingStream.cs
- documentsequencetextview.cs
- StylusPointDescription.cs
- DataGridItemEventArgs.cs
- ProfilePropertySettingsCollection.cs
- BuildProviderCollection.cs
- InvalidateEvent.cs
- SafeEventLogWriteHandle.cs
- TransformerInfoCollection.cs