Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- EntityDesignerDataSourceView.cs
- LingerOption.cs
- WebServicesDescriptionAttribute.cs
- RuleSettingsCollection.cs
- WebConfigurationHost.cs
- DefaultCompensation.cs
- FastPropertyAccessor.cs
- Emitter.cs
- GradientBrush.cs
- TouchPoint.cs
- PseudoWebRequest.cs
- MiniModule.cs
- SafeCryptoHandles.cs
- StylusPointDescription.cs
- AssemblyCollection.cs
- TextStore.cs
- SystemUdpStatistics.cs
- TypeBrowser.xaml.cs
- TemplatePropertyEntry.cs
- MultiTouchSystemGestureLogic.cs
- FacetChecker.cs
- Mapping.cs
- BaseValidator.cs
- ObjectDisposedException.cs
- WebPartZoneBase.cs
- storepermission.cs
- ObfuscationAttribute.cs
- IndicCharClassifier.cs
- MethodBuilderInstantiation.cs
- SelectedDatesCollection.cs
- XmlTextEncoder.cs
- IsolationInterop.cs
- Identity.cs
- PtsHelper.cs
- DesignerValidationSummaryAdapter.cs
- FileSystemInfo.cs
- XhtmlTextWriter.cs
- OleDbWrapper.cs
- KnownTypesProvider.cs
- ConfigurationLocationCollection.cs
- RecordsAffectedEventArgs.cs
- DoubleCollection.cs
- RpcResponse.cs
- SHA384Cng.cs
- ViewValidator.cs
- CellParaClient.cs
- SafeRegistryKey.cs
- ExtendedPropertyCollection.cs
- ValidatingCollection.cs
- TextPattern.cs
- AlternateView.cs
- WebPartUtil.cs
- ResourceAttributes.cs
- HostingEnvironment.cs
- SwitchAttribute.cs
- CommandID.cs
- WebWorkflowRole.cs
- RecordConverter.cs
- FileDialogCustomPlaces.cs
- XmlSchema.cs
- DataGridCell.cs
- NetStream.cs
- UnsafeNativeMethods.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- DocumentsTrace.cs
- KnownBoxes.cs
- SoapAttributeOverrides.cs
- StructuredProperty.cs
- ConnectionManagementElementCollection.cs
- MatrixTransform.cs
- localization.cs
- CompensationExtension.cs
- ThemeableAttribute.cs
- DataColumnSelectionConverter.cs
- CodeBinaryOperatorExpression.cs
- CodeChecksumPragma.cs
- CmsInterop.cs
- RootBrowserWindow.cs
- ReadOnlyDataSourceView.cs
- FilterException.cs
- NativeMethodsOther.cs
- DPCustomTypeDescriptor.cs
- WebPartsSection.cs
- RadioButton.cs
- RuntimeResourceSet.cs
- CharEnumerator.cs
- MemberAccessException.cs
- NetCodeGroup.cs
- CodeDomLocalizationProvider.cs
- Bits.cs
- AttributedMetaModel.cs
- PrintPreviewDialog.cs
- SamlAuthorizationDecisionStatement.cs
- CSharpCodeProvider.cs
- OutKeywords.cs
- ContextMenuStrip.cs
- ILGen.cs
- StandardCommands.cs
- GlobalEventManager.cs
- SerializationSectionGroup.cs