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
- InvalidCastException.cs
- SamlAuthenticationClaimResource.cs
- ListViewItemSelectionChangedEvent.cs
- WorkItem.cs
- WS2007FederationHttpBindingCollectionElement.cs
- XamlTemplateSerializer.cs
- UnauthorizedWebPart.cs
- ButtonFieldBase.cs
- ProfessionalColorTable.cs
- ConfigXmlCDataSection.cs
- LicFileLicenseProvider.cs
- WriterOutput.cs
- WmiEventSink.cs
- ReflectPropertyDescriptor.cs
- Rect3DConverter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ValueHandle.cs
- RoleManagerSection.cs
- TreeNodeMouseHoverEvent.cs
- ReaderWriterLock.cs
- TimeSpanOrInfiniteValidator.cs
- EventMap.cs
- SqlAggregateChecker.cs
- SchemaElement.cs
- PersonalizationDictionary.cs
- HtmlElementErrorEventArgs.cs
- EventSinkHelperWriter.cs
- DateTimeSerializationSection.cs
- BitmapEffectInputConnector.cs
- MustUnderstandSoapException.cs
- entityreference_tresulttype.cs
- XmlImplementation.cs
- WebPartMovingEventArgs.cs
- NestPullup.cs
- SystemIPInterfaceProperties.cs
- PermissionSetEnumerator.cs
- HtmlGenericControl.cs
- SingleConverter.cs
- CompilerTypeWithParams.cs
- MasterPageParser.cs
- WindowsButton.cs
- DocumentSequence.cs
- SecurityDocument.cs
- RawKeyboardInputReport.cs
- SqlClientWrapperSmiStreamChars.cs
- Border.cs
- ConnectionManagementElementCollection.cs
- MessageQuerySet.cs
- DataGridBoolColumn.cs
- HttpValueCollection.cs
- StateItem.cs
- LineProperties.cs
- NetworkInformationPermission.cs
- TextPointerBase.cs
- StreamGeometryContext.cs
- Error.cs
- UrlPath.cs
- NamedPipeProcessProtocolHandler.cs
- SqlInternalConnection.cs
- SafeNativeMethods.cs
- TableLayoutCellPaintEventArgs.cs
- MsmqException.cs
- OleDbStruct.cs
- DataServiceConfiguration.cs
- PeerNearMe.cs
- RetrieveVirtualItemEventArgs.cs
- CodeGeneratorOptions.cs
- CreateUserWizardStep.cs
- tibetanshape.cs
- GeneralTransform3DCollection.cs
- SR.cs
- QueryCacheKey.cs
- HashStream.cs
- Attributes.cs
- FrugalList.cs
- MimeParameters.cs
- CompilerErrorCollection.cs
- GlobalizationSection.cs
- ThaiBuddhistCalendar.cs
- WindowsListViewScroll.cs
- FileSystemWatcher.cs
- GeometryModel3D.cs
- SerializeAbsoluteContext.cs
- ProxyGenerationError.cs
- DataTableReader.cs
- SystemIPAddressInformation.cs
- OverlappedContext.cs
- StyleSheetComponentEditor.cs
- DataSourceCacheDurationConverter.cs
- CommonRemoteMemoryBlock.cs
- MeshGeometry3D.cs
- Soap12ProtocolReflector.cs
- MediaElementAutomationPeer.cs
- TypeResolver.cs
- SecurityBindingElementImporter.cs
- ShaderEffect.cs
- CustomValidator.cs
- DataSourceXmlElementAttribute.cs
- MatrixAnimationUsingKeyFrames.cs
- ProfileBuildProvider.cs