Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / CompilerServices / RuntimeWrappedException.cs / 1305376 / 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; using System.Diagnostics.Contracts; [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; [System.Security.SecurityCritical] // auto-generated_required public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } Contract.EndContractBlock(); 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; using System.Diagnostics.Contracts; [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; [System.Security.SecurityCritical] // auto-generated_required public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info==null) { throw new ArgumentNullException("info"); } Contract.EndContractBlock(); 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
- SQLResource.cs
- ObjectSecurityT.cs
- ItemTypeToolStripMenuItem.cs
- SmtpLoginAuthenticationModule.cs
- DataRowView.cs
- ReflectionHelper.cs
- XmlWriterSettings.cs
- ConfigurationSection.cs
- DocumentReference.cs
- UTF7Encoding.cs
- ProfileManager.cs
- EnumValidator.cs
- X509PeerCertificateElement.cs
- ImportContext.cs
- EventBookmark.cs
- SQLInt16.cs
- PnrpPeerResolverBindingElement.cs
- IdentityReference.cs
- ServiceProviders.cs
- WebSysDefaultValueAttribute.cs
- CssClassPropertyAttribute.cs
- SelectedGridItemChangedEvent.cs
- Select.cs
- TraceInternal.cs
- TemplatedAdorner.cs
- EntityDataSourceUtil.cs
- DataTableMappingCollection.cs
- SelectManyQueryOperator.cs
- WebZone.cs
- TypeLoadException.cs
- TableColumnCollectionInternal.cs
- ValidatingPropertiesEventArgs.cs
- StateChangeEvent.cs
- WeakRefEnumerator.cs
- UxThemeWrapper.cs
- DBPropSet.cs
- HelpPage.cs
- FontUnitConverter.cs
- Grammar.cs
- ExtensionsSection.cs
- SignatureDescription.cs
- TCPClient.cs
- DurableInstancingOptions.cs
- ECDiffieHellman.cs
- AmbientValueAttribute.cs
- updateconfighost.cs
- WebPartDisplayModeCollection.cs
- TcpConnectionPoolSettingsElement.cs
- ExpanderAutomationPeer.cs
- Activity.cs
- HistoryEventArgs.cs
- XPathNodePointer.cs
- WebRequestModuleElementCollection.cs
- RuleSettingsCollection.cs
- RegionInfo.cs
- DbConnectionPoolOptions.cs
- InputScope.cs
- RoleService.cs
- HwndSourceParameters.cs
- ASCIIEncoding.cs
- ProjectionPruner.cs
- FamilyTypefaceCollection.cs
- ResourceReferenceKeyNotFoundException.cs
- HMACRIPEMD160.cs
- Menu.cs
- KerberosRequestorSecurityToken.cs
- CdpEqualityComparer.cs
- SubtreeProcessor.cs
- DesignerOptionService.cs
- CheckBoxRenderer.cs
- Pkcs7Recipient.cs
- TextElementCollectionHelper.cs
- ColorMap.cs
- Propagator.Evaluator.cs
- HtmlInputReset.cs
- SqlUtils.cs
- OptimalBreakSession.cs
- BufferedWebEventProvider.cs
- DesignTimeParseData.cs
- RectKeyFrameCollection.cs
- DateBoldEvent.cs
- CharUnicodeInfo.cs
- BigInt.cs
- UserPreferenceChangedEventArgs.cs
- NativeMethods.cs
- MemoryRecordBuffer.cs
- FatalException.cs
- MissingManifestResourceException.cs
- SqlCacheDependencySection.cs
- ToolStripSplitButton.cs
- _TLSstream.cs
- AuthenticateEventArgs.cs
- StrokeCollection.cs
- QueueProcessor.cs
- StringFunctions.cs
- FixedSOMTextRun.cs
- GestureRecognitionResult.cs
- ComponentManagerBroker.cs
- OdbcHandle.cs
- RegistryPermission.cs