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
- ObjectQueryExecutionPlan.cs
- HttpListener.cs
- CacheForPrimitiveTypes.cs
- RegistrationServices.cs
- PeerCredential.cs
- SqlConnectionPoolGroupProviderInfo.cs
- HttpCapabilitiesBase.cs
- TerminatorSinks.cs
- oledbconnectionstring.cs
- BuildProviderAppliesToAttribute.cs
- DomainConstraint.cs
- WebPartVerbCollection.cs
- StringSorter.cs
- UseManagedPresentationElement.cs
- XmlSerializer.cs
- SR.cs
- RijndaelManaged.cs
- DesignerSerializationVisibilityAttribute.cs
- TableAutomationPeer.cs
- DesignRelationCollection.cs
- MarkupWriter.cs
- UriTemplateTableMatchCandidate.cs
- Point4DValueSerializer.cs
- ImageSourceValueSerializer.cs
- ProcessStartInfo.cs
- TemplateBaseAction.cs
- NodeLabelEditEvent.cs
- SspiHelper.cs
- SqlBooleanizer.cs
- ScriptingProfileServiceSection.cs
- _SslState.cs
- TextView.cs
- ReflectPropertyDescriptor.cs
- Expression.cs
- Selector.cs
- SHA1CryptoServiceProvider.cs
- TimersDescriptionAttribute.cs
- UrlMappingsSection.cs
- ComContractElementCollection.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- odbcmetadatacollectionnames.cs
- _Rfc2616CacheValidators.cs
- SoapAttributeOverrides.cs
- PageThemeBuildProvider.cs
- EmptyControlCollection.cs
- GlobalizationSection.cs
- IndentedTextWriter.cs
- ObjectDataSourceDisposingEventArgs.cs
- ToolboxItemAttribute.cs
- DBConnection.cs
- XmlCountingReader.cs
- CacheAxisQuery.cs
- NativeMethods.cs
- SourceFileInfo.cs
- BitmapEffectDrawing.cs
- EnumType.cs
- TypeEnumerableViewSchema.cs
- PrintDialog.cs
- ProtocolsSection.cs
- JsonClassDataContract.cs
- TextDecorationCollectionConverter.cs
- StrongNameKeyPair.cs
- TypeExtensionSerializer.cs
- XmlSchemaCollection.cs
- DrawingImage.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SoapElementAttribute.cs
- SpotLight.cs
- TypeSystem.cs
- DetailsViewUpdatedEventArgs.cs
- OdbcInfoMessageEvent.cs
- DataComponentGenerator.cs
- KoreanCalendar.cs
- UnionQueryOperator.cs
- DecryptRequest.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DataListCommandEventArgs.cs
- GridSplitterAutomationPeer.cs
- MarkupCompilePass2.cs
- StylusPointProperties.cs
- CodeEventReferenceExpression.cs
- SqlVisitor.cs
- LinqDataSourceContextData.cs
- WebControl.cs
- AutoSizeToolBoxItem.cs
- GroupItemAutomationPeer.cs
- parserscommon.cs
- ComNativeDescriptor.cs
- ExpandCollapsePattern.cs
- EmptyCollection.cs
- NominalTypeEliminator.cs
- CodeCatchClause.cs
- MouseBinding.cs
- ToolStripDropDownItem.cs
- WebConfigurationHostFileChange.cs
- DeploymentSectionCache.cs
- DiscardableAttribute.cs
- CompareValidator.cs
- RelationshipEntry.cs
- LogReserveAndAppendState.cs