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
- X509ChainPolicy.cs
- OutputCacheModule.cs
- ActivityExecutorOperation.cs
- PrePrepareMethodAttribute.cs
- CachingHintValidation.cs
- AsymmetricSignatureDeformatter.cs
- Adorner.cs
- FixedSOMLineCollection.cs
- WsiProfilesElementCollection.cs
- TableColumn.cs
- WorkerRequest.cs
- CompiledELinqQueryState.cs
- CryptoApi.cs
- ConsoleTraceListener.cs
- AncillaryOps.cs
- ProbeRequestResponseAsyncResult.cs
- ClientConvert.cs
- LicenseProviderAttribute.cs
- TaskFileService.cs
- DescendantQuery.cs
- ScriptManagerProxy.cs
- PingReply.cs
- PropertyStore.cs
- PrePrepareMethodAttribute.cs
- Int32RectValueSerializer.cs
- TraceProvider.cs
- WeakRefEnumerator.cs
- SqlBuilder.cs
- GZipDecoder.cs
- TextContainer.cs
- Label.cs
- WebDisplayNameAttribute.cs
- TdsParserHelperClasses.cs
- Html32TextWriter.cs
- XmlHierarchicalDataSourceView.cs
- XmlSchemaType.cs
- SQLDateTimeStorage.cs
- ContractBase.cs
- TableItemPatternIdentifiers.cs
- COSERVERINFO.cs
- DATA_BLOB.cs
- OrderedDictionary.cs
- DispatcherTimer.cs
- DataGridViewRowHeaderCell.cs
- DbConnectionPool.cs
- TreeViewImageIndexConverter.cs
- FormatConvertedBitmap.cs
- SecurityKeyType.cs
- Size.cs
- TraceData.cs
- InternalsVisibleToAttribute.cs
- DragEvent.cs
- HttpRequest.cs
- NumericUpDownAccelerationCollection.cs
- Translator.cs
- AssemblyCache.cs
- WindowsGraphics2.cs
- Menu.cs
- ScrollChrome.cs
- Tokenizer.cs
- OdbcEnvironmentHandle.cs
- TreeViewCancelEvent.cs
- ApplicationContext.cs
- SqlExpander.cs
- TriggerBase.cs
- RadioButtonAutomationPeer.cs
- XsdDuration.cs
- EndpointInfoCollection.cs
- ExceptionRoutedEventArgs.cs
- ControlCachePolicy.cs
- CodeVariableReferenceExpression.cs
- LinqExpressionNormalizer.cs
- Signature.cs
- DataContractSerializerOperationGenerator.cs
- MediaCommands.cs
- AbandonedMutexException.cs
- NamespaceCollection.cs
- ThicknessAnimation.cs
- HttpProfileBase.cs
- DrawingVisualDrawingContext.cs
- DataContractFormatAttribute.cs
- XmlSchemaComplexContentRestriction.cs
- SecurityException.cs
- UTF32Encoding.cs
- CheckedPointers.cs
- InternalBase.cs
- XmlSerializableWriter.cs
- XmlRawWriter.cs
- SafeNativeMethods.cs
- WebControlAdapter.cs
- SymbolEqualComparer.cs
- GZipStream.cs
- TemplateLookupAction.cs
- ProfileService.cs
- ActivityTypeDesigner.xaml.cs
- RawUIStateInputReport.cs
- PositiveTimeSpanValidatorAttribute.cs
- TextRunCache.cs
- LabelDesigner.cs
- ObjectListShowCommandsEventArgs.cs