Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PropertyGeneratedEventArgs.cs
- BoolLiteral.cs
- ProtocolViolationException.cs
- HttpRequestCacheValidator.cs
- AssociationProvider.cs
- Thickness.cs
- LogLogRecordEnumerator.cs
- Column.cs
- SqlNodeAnnotation.cs
- SiteMapDataSourceView.cs
- CompiledQuery.cs
- BCryptHashAlgorithm.cs
- WindowsListView.cs
- Models.cs
- CodePrimitiveExpression.cs
- Cursors.cs
- Effect.cs
- _LocalDataStoreMgr.cs
- ContentWrapperAttribute.cs
- DeviceContext.cs
- DefaultExpression.cs
- UnsafeCollabNativeMethods.cs
- SqlConnection.cs
- ReachBasicContext.cs
- CapiSafeHandles.cs
- TreeNodeClickEventArgs.cs
- CommandLineParser.cs
- DateTimeUtil.cs
- UnsafeNativeMethods.cs
- CodeBlockBuilder.cs
- Stack.cs
- SchemaTypeEmitter.cs
- WorkflowMessageEventArgs.cs
- AuthStoreRoleProvider.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- AnnotationDocumentPaginator.cs
- ColorContextHelper.cs
- EventPropertyMap.cs
- DrawingAttributesDefaultValueFactory.cs
- SeparatorAutomationPeer.cs
- BitmapEffectInput.cs
- NamespaceExpr.cs
- SqlProvider.cs
- EntityDataSourceState.cs
- X509PeerCertificateAuthenticationElement.cs
- ByteAnimationBase.cs
- ThumbAutomationPeer.cs
- WebBrowserNavigatingEventHandler.cs
- MessageDispatch.cs
- MimeMapping.cs
- ArgumentNullException.cs
- HwndAppCommandInputProvider.cs
- TableLayoutSettings.cs
- ToolTipService.cs
- SmiTypedGetterSetter.cs
- ColorBlend.cs
- Error.cs
- WebEvents.cs
- EdmComplexTypeAttribute.cs
- ProfilePropertySettings.cs
- Executor.cs
- DataMember.cs
- WindowsTooltip.cs
- ValueOfAction.cs
- SQLInt64Storage.cs
- ConnectionStringEditor.cs
- DesignObjectWrapper.cs
- BaseAsyncResult.cs
- ValidationErrorEventArgs.cs
- BufferedGraphicsContext.cs
- ValidatingPropertiesEventArgs.cs
- CompiledXpathExpr.cs
- Decorator.cs
- ExtensionWindow.cs
- EditorZoneBase.cs
- NamespaceMapping.cs
- JsonXmlDataContract.cs
- QueryTaskGroupState.cs
- LinearGradientBrush.cs
- HitTestWithGeometryDrawingContextWalker.cs
- GenericWebPart.cs
- ParsedAttributeCollection.cs
- DataReceivedEventArgs.cs
- GridViewRowCollection.cs
- StrongNameMembershipCondition.cs
- ChangesetResponse.cs
- DropDownButton.cs
- MenuStrip.cs
- X509ChainPolicy.cs
- BitmapSourceSafeMILHandle.cs
- AuthenticationServiceManager.cs
- IgnoreDataMemberAttribute.cs
- ReferencedCollectionType.cs
- InputMethod.cs
- TableDesigner.cs
- XmlDocument.cs
- TextPointer.cs
- InheritanceService.cs
- SafeFindHandle.cs
- ResetableIterator.cs