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
- ExtendedPropertyCollection.cs
- XamlReaderHelper.cs
- TextAdaptor.cs
- SystemKeyConverter.cs
- DataGridViewDataConnection.cs
- IIS7WorkerRequest.cs
- HyperLinkField.cs
- DependencyObject.cs
- DataViewListener.cs
- _ConnectOverlappedAsyncResult.cs
- GeometryHitTestResult.cs
- DataView.cs
- BStrWrapper.cs
- TreeNodeStyleCollection.cs
- TogglePattern.cs
- FontSourceCollection.cs
- DbgUtil.cs
- SafeNativeMemoryHandle.cs
- ListChangedEventArgs.cs
- XmlSchemaGroup.cs
- XmlWrappingReader.cs
- StopStoryboard.cs
- GridPattern.cs
- XmlCDATASection.cs
- StateChangeEvent.cs
- DataGridViewUtilities.cs
- Localizer.cs
- FontStretch.cs
- TemplateComponentConnector.cs
- DetailsViewAutoFormat.cs
- CommonProperties.cs
- ListenerConstants.cs
- ReadOnlyNameValueCollection.cs
- ExpressionList.cs
- Stream.cs
- CatchDesigner.xaml.cs
- TargetPerspective.cs
- ThreadStateException.cs
- ColorMatrix.cs
- SizeValueSerializer.cs
- DecimalAnimation.cs
- SizeKeyFrameCollection.cs
- XamlGridLengthSerializer.cs
- DynamicControlParameter.cs
- FacetDescription.cs
- InputMethodStateChangeEventArgs.cs
- HtmlInputFile.cs
- KeyNotFoundException.cs
- EndpointInfoCollection.cs
- SourceLocation.cs
- TypeResolvingOptions.cs
- LineGeometry.cs
- KnownColorTable.cs
- RowCache.cs
- Vertex.cs
- DesignerLoader.cs
- MdImport.cs
- ComEventsHelper.cs
- RawStylusInputReport.cs
- GridItem.cs
- ExpandableObjectConverter.cs
- PropertyValue.cs
- VirtualPathProvider.cs
- CollectionViewGroupRoot.cs
- PropertyMapper.cs
- MultipleViewProviderWrapper.cs
- IisTraceWebEventProvider.cs
- XmlHelper.cs
- HashHelpers.cs
- SevenBitStream.cs
- EllipticalNodeOperations.cs
- StrongNameKeyPair.cs
- MetadataItem_Static.cs
- TypeUsageBuilder.cs
- WithStatement.cs
- DBDataPermission.cs
- ServiceDescriptionReflector.cs
- LockedBorderGlyph.cs
- HandleValueEditor.cs
- RectangleF.cs
- NamedElement.cs
- Hash.cs
- PeerNameResolver.cs
- SQLRoleProvider.cs
- RemotingSurrogateSelector.cs
- AsnEncodedData.cs
- CodeGroup.cs
- PathFigureCollection.cs
- ConnectorSelectionGlyph.cs
- DoubleLinkListEnumerator.cs
- ObjectFullSpanRewriter.cs
- MenuItemBindingCollection.cs
- AssertSection.cs
- DataServiceResponse.cs
- RuntimeWrappedException.cs
- LicenseProviderAttribute.cs
- VisualBasicExpressionConverter.cs
- _CacheStreams.cs
- HMAC.cs
- AsyncSerializedWorker.cs