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
- XmlEnumAttribute.cs
- unsafeIndexingFilterStream.cs
- SemaphoreFullException.cs
- HtmlElement.cs
- RegularExpressionValidator.cs
- GAC.cs
- CompareValidator.cs
- Configuration.cs
- DateTimeSerializationSection.cs
- APCustomTypeDescriptor.cs
- TransformerInfo.cs
- ListView.cs
- TypeGenericEnumerableViewSchema.cs
- SelectedDatesCollection.cs
- DnsPermission.cs
- TextParagraphView.cs
- MulticastOption.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- HierarchicalDataBoundControlAdapter.cs
- SrgsItemList.cs
- ObjectCloneHelper.cs
- MachineKeySection.cs
- FixedNode.cs
- BevelBitmapEffect.cs
- FormatterServices.cs
- TypeUtil.cs
- BitmapCacheBrush.cs
- QueryableFilterRepeater.cs
- oledbconnectionstring.cs
- QueryableDataSourceView.cs
- ResolvedKeyFrameEntry.cs
- MyContact.cs
- X509DefaultServiceCertificateElement.cs
- ElementProxy.cs
- ChannelProtectionRequirements.cs
- DataTableReader.cs
- GeneralTransformGroup.cs
- ProjectionNode.cs
- QueryProcessor.cs
- IIS7UserPrincipal.cs
- StoreContentChangedEventArgs.cs
- GlyphShapingProperties.cs
- EmptyStringExpandableObjectConverter.cs
- WinEventQueueItem.cs
- ListControl.cs
- Signature.cs
- SqlConnectionPoolProviderInfo.cs
- ExpressionNormalizer.cs
- ApplicationCommands.cs
- InternalControlCollection.cs
- NonVisualControlAttribute.cs
- DefaultPrintController.cs
- controlskin.cs
- SafeNativeMethods.cs
- BindingContext.cs
- ExpressionBindingCollection.cs
- CreateRefExpr.cs
- DefaultSerializationProviderAttribute.cs
- ScaleTransform.cs
- ISFClipboardData.cs
- PublisherIdentityPermission.cs
- ResXResourceWriter.cs
- MetadataSerializer.cs
- EntityContainerEmitter.cs
- MultipartContentParser.cs
- ResourcesGenerator.cs
- ConfigurationConverterBase.cs
- EntityDataSourceReferenceGroup.cs
- DataGridViewCellStateChangedEventArgs.cs
- InfoCard.cs
- ReservationCollection.cs
- EntityObject.cs
- FailedToStartupUIException.cs
- FlatButtonAppearance.cs
- sqlcontext.cs
- _Connection.cs
- VoiceChangeEventArgs.cs
- GroupLabel.cs
- CheckBoxStandardAdapter.cs
- Process.cs
- LineMetrics.cs
- CompoundFileStorageReference.cs
- FrameworkContentElementAutomationPeer.cs
- KeyToListMap.cs
- QuaternionAnimationUsingKeyFrames.cs
- SiteMapNodeCollection.cs
- AttributeQuery.cs
- SamlConstants.cs
- SubordinateTransaction.cs
- TableRow.cs
- HtmlTableRow.cs
- PropertyPushdownHelper.cs
- DetailsViewRowCollection.cs
- BitmapEffectInputData.cs
- CfgArc.cs
- ListChangedEventArgs.cs
- SortFieldComparer.cs
- StreamReader.cs
- SqlCommandSet.cs
- CalendarDataBindingHandler.cs