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
- SessionPageStateSection.cs
- TimeoutValidationAttribute.cs
- MsmqIntegrationSecurity.cs
- CreateUserErrorEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs
- PolygonHotSpot.cs
- ClientConfigPaths.cs
- TextEffectCollection.cs
- SafeCoTaskMem.cs
- AnnotationAuthorChangedEventArgs.cs
- Utils.cs
- SimpleMailWebEventProvider.cs
- ArraySortHelper.cs
- CodeObjectCreateExpression.cs
- AuthorizationPolicyTypeElementCollection.cs
- WebServiceClientProxyGenerator.cs
- AssemblyHash.cs
- DataGridViewLinkColumn.cs
- PreviewPageInfo.cs
- PingOptions.cs
- DbDataAdapter.cs
- DocumentAutomationPeer.cs
- StylusPointCollection.cs
- ModuleBuilder.cs
- QuaternionAnimationBase.cs
- WasEndpointConfigContainer.cs
- XmlSchemaSimpleTypeUnion.cs
- DataServiceProcessingPipelineEventArgs.cs
- ServiceRoute.cs
- SemanticResultValue.cs
- NavigationPropertySingletonExpression.cs
- ProgressBar.cs
- XslCompiledTransform.cs
- TransformValueSerializer.cs
- ObjectListGeneralPage.cs
- OutOfMemoryException.cs
- PartialTrustVisibleAssemblyCollection.cs
- GiveFeedbackEventArgs.cs
- MembershipPasswordException.cs
- VScrollProperties.cs
- CodeTypeConstructor.cs
- SqlMultiplexer.cs
- CatalogPartChrome.cs
- SurrogateSelector.cs
- SiteMapDataSourceDesigner.cs
- ExitEventArgs.cs
- hresults.cs
- Instrumentation.cs
- CookielessHelper.cs
- NonValidatingSecurityTokenAuthenticator.cs
- CreateCardRequest.cs
- XmlSchema.cs
- sqlpipe.cs
- Function.cs
- Wizard.cs
- CompositeControlDesigner.cs
- TypeInfo.cs
- AggregateNode.cs
- QilInvokeLateBound.cs
- Timer.cs
- ParseNumbers.cs
- PrePostDescendentsWalker.cs
- PropertyTabAttribute.cs
- HttpProfileGroupBase.cs
- Registration.cs
- LogicalChannelCollection.cs
- Canonicalizers.cs
- InvalidAsynchronousStateException.cs
- SmtpException.cs
- DynamicMetaObjectBinder.cs
- PathHelper.cs
- dbenumerator.cs
- HttpCacheParams.cs
- AsymmetricKeyExchangeFormatter.cs
- PerformanceCounterManager.cs
- BaseTransportHeaders.cs
- GroupPartitionExpr.cs
- AttachmentService.cs
- SendKeys.cs
- ErrorTableItemStyle.cs
- SpellCheck.cs
- PanelStyle.cs
- AspNetHostingPermission.cs
- TemplateNameScope.cs
- StyleCollection.cs
- CommandField.cs
- PreviewControlDesigner.cs
- QilReference.cs
- MatrixStack.cs
- QueryableDataSource.cs
- ButtonRenderer.cs
- RelationshipEndMember.cs
- ComboBox.cs
- ShapeTypeface.cs
- XmlSchemaImporter.cs
- FirewallWrapper.cs
- BinaryFormatter.cs
- UnlockCardRequest.cs
- XmlCharCheckingReader.cs
- StreamUpdate.cs