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
- RoleGroupCollection.cs
- SelectManyQueryOperator.cs
- ListenerElementsCollection.cs
- SQLRoleProvider.cs
- SpecialNameAttribute.cs
- PropertiesTab.cs
- EntityProviderFactory.cs
- LocalizeDesigner.cs
- coordinatorfactory.cs
- DetailsViewPageEventArgs.cs
- CircleHotSpot.cs
- OrderedDictionary.cs
- RoleGroupCollectionEditor.cs
- TreeSet.cs
- ListItemCollection.cs
- TimelineGroup.cs
- ProxyManager.cs
- StringBlob.cs
- SerialReceived.cs
- FrameworkPropertyMetadata.cs
- Rectangle.cs
- RadioButtonPopupAdapter.cs
- BufferAllocator.cs
- PlanCompilerUtil.cs
- CodeActivityMetadata.cs
- BuildProvidersCompiler.cs
- ProjectionRewriter.cs
- BehaviorEditorPart.cs
- MemberBinding.cs
- TextRange.cs
- ClientSettingsStore.cs
- ServiceInfo.cs
- MailWebEventProvider.cs
- HttpModule.cs
- CustomPopupPlacement.cs
- WindowsListViewGroup.cs
- AddInEnvironment.cs
- AnnotationResourceChangedEventArgs.cs
- OSFeature.cs
- ParagraphVisual.cs
- ResourceCategoryAttribute.cs
- TypeLibConverter.cs
- ToggleButton.cs
- DataGridRowEventArgs.cs
- ConfigurationManagerInternalFactory.cs
- DockingAttribute.cs
- WrappedReader.cs
- Literal.cs
- StylusButtonEventArgs.cs
- COM2FontConverter.cs
- IconConverter.cs
- EntityCommand.cs
- ComponentResourceManager.cs
- XmlWriterTraceListener.cs
- CompilerCollection.cs
- ServiceDescription.cs
- ExpressionLexer.cs
- BlockCollection.cs
- AssemblyBuilder.cs
- AttachmentCollection.cs
- SignatureToken.cs
- SafeNativeHandle.cs
- TypefaceCollection.cs
- SrgsElementFactoryCompiler.cs
- TextServicesCompartmentContext.cs
- RowToParametersTransformer.cs
- ComponentDispatcher.cs
- WebConfigurationFileMap.cs
- XmlProcessingInstruction.cs
- SqlDataSourceCommandEventArgs.cs
- DispatcherOperation.cs
- ResourceDisplayNameAttribute.cs
- X509Utils.cs
- MaterializeFromAtom.cs
- WorkflowTraceTransfer.cs
- VerifyHashRequest.cs
- AngleUtil.cs
- DataObjectMethodAttribute.cs
- XmlComment.cs
- Int32Storage.cs
- SiteMapHierarchicalDataSourceView.cs
- Input.cs
- LayoutTable.cs
- GeneralTransform3DGroup.cs
- QilTernary.cs
- shaperfactory.cs
- TextBoxAutoCompleteSourceConverter.cs
- Rect3D.cs
- LinkLabelLinkClickedEvent.cs
- DataFormats.cs
- FilteredAttributeCollection.cs
- DispatchChannelSink.cs
- CrossContextChannel.cs
- ScriptMethodAttribute.cs
- EncoderParameter.cs
- XmlUrlResolver.cs
- SamlAdvice.cs
- SqlDataSourceStatusEventArgs.cs
- TextFormatterImp.cs
- Dynamic.cs