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
- DecoratedNameAttribute.cs
- _NetworkingPerfCounters.cs
- Propagator.ExtentPlaceholderCreator.cs
- StandardBindingCollectionElement.cs
- Rectangle.cs
- RoutedUICommand.cs
- PartialTrustVisibleAssemblyCollection.cs
- GCHandleCookieTable.cs
- XmlSchemaImporter.cs
- MarshalByValueComponent.cs
- BaseCAMarshaler.cs
- DateTimeFormat.cs
- COM2PictureConverter.cs
- XmlSchemaException.cs
- PtsHost.cs
- CreateUserErrorEventArgs.cs
- SessionIDManager.cs
- XmlNode.cs
- IteratorFilter.cs
- AuthorizationRuleCollection.cs
- EntityCommandExecutionException.cs
- JsonByteArrayDataContract.cs
- ColorMap.cs
- StorageMappingFragment.cs
- VisualStyleInformation.cs
- BooleanStorage.cs
- Types.cs
- HWStack.cs
- DataTable.cs
- XmlSchemaIdentityConstraint.cs
- InvokeWebServiceDesigner.cs
- TcpStreams.cs
- ResourceSet.cs
- ChangeProcessor.cs
- OletxVolatileEnlistment.cs
- UnhandledExceptionEventArgs.cs
- ExceptionUtil.cs
- DbQueryCommandTree.cs
- VersionedStreamOwner.cs
- ImageAttributes.cs
- SpellerError.cs
- PropertyChangingEventArgs.cs
- RSACryptoServiceProvider.cs
- OleDbConnectionFactory.cs
- FirstQueryOperator.cs
- MediaScriptCommandRoutedEventArgs.cs
- OdbcConnection.cs
- ProfessionalColorTable.cs
- XmlArrayAttribute.cs
- AudioFormatConverter.cs
- EDesignUtil.cs
- TextBoxAutomationPeer.cs
- TreeNodeClickEventArgs.cs
- UnSafeCharBuffer.cs
- RandomDelayQueuedSendsAsyncResult.cs
- CompilerGeneratedAttribute.cs
- SiteOfOriginPart.cs
- TextCollapsingProperties.cs
- WCFServiceClientProxyGenerator.cs
- RTLAwareMessageBox.cs
- CodeDomLoader.cs
- HttpListenerContext.cs
- Point3DKeyFrameCollection.cs
- DataGridViewRowEventArgs.cs
- TypeBuilderInstantiation.cs
- AnnotationHighlightLayer.cs
- TableDesigner.cs
- ConnectionStringsExpressionBuilder.cs
- OletxCommittableTransaction.cs
- CriticalHandle.cs
- Constants.cs
- ResourceManager.cs
- ScriptManager.cs
- FileDataSourceCache.cs
- CategoryNameCollection.cs
- DataControlLinkButton.cs
- MarshalDirectiveException.cs
- LateBoundBitmapDecoder.cs
- HttpProfileGroupBase.cs
- HMACSHA512.cs
- EditCommandColumn.cs
- CharAnimationBase.cs
- DataGridRow.cs
- VectorCollectionConverter.cs
- ComplexBindingPropertiesAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- ZipIOExtraFieldElement.cs
- ClosableStream.cs
- RoleService.cs
- SHA512.cs
- OdbcConnectionString.cs
- PopupRoot.cs
- MachineKeySection.cs
- XmlQueryTypeFactory.cs
- XmlCompatibilityReader.cs
- CngKeyBlobFormat.cs
- StylusPointProperty.cs
- GCHandleCookieTable.cs
- regiisutil.cs
- PartitionedStreamMerger.cs