Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Threading / DispatcherExceptionFilterEventArgs.cs / 1 / DispatcherExceptionFilterEventArgs.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Arguments for the ExceptionFilter event. The event is raised // when a dispatcher exception has occured. This event is raised // before the callstack is unwound. // // History: // 07/22/2003 : [....] - Created // //--------------------------------------------------------------------------- using System.Diagnostics; using System; namespace System.Windows.Threading { ////// Arguments for the ExceptionFilter event. The event is raised when /// a dispatcher exception has occured. /// ////// This event is raised before the callstack is unwound. /// public sealed class DispatcherUnhandledExceptionFilterEventArgs : DispatcherEventArgs { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- // Initialize a new event argument. internal DispatcherUnhandledExceptionFilterEventArgs(Dispatcher dispatcher) : base(dispatcher) { } //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- ////// The exception that was raised on a thread operating within /// the dispatcher. /// public Exception Exception { get { return _exception; } } ////// Whether or not the exception should be caught and the exception /// event handlers called. /// ////// A filter handler can set this property to false to request that /// the exception not be caught, to avoid the callstack getting /// unwound up to the Dispatcher. /// /// A previous handler in the event multicast might have already set this /// property to false, signalling that the exception will not be caught. /// We let the "don't catch" behavior override all others because /// it most likely means a debugging scenario. /// public bool RequestCatch { get { return _requestCatch; } set { // Only allow to be set false. if (value == false) { _requestCatch = value; } } } //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ ////// Initialize the preallocated args class for use. /// ////// This method MUST NOT FAIL because it is called from an exception /// handler: do not do any heavy lifting or allocate more memory. /// This initialization step is separated from the constructor /// precisely because we wanted to preallocate the memory and avoid /// hitting a secondary exception in the out-of-memory case. /// /// /// The exception that was raised while executing code via the /// dispatcher. /// /// /// Whether or not the exception should be caught and the /// exception handlers called. /// internal void Initialize(Exception exception, bool requestCatch) { Debug.Assert(exception != null); _exception = exception; _requestCatch = requestCatch; } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ private Exception _exception; private bool _requestCatch; } ////// Delegate for the events that convey the state of the UiConext /// in response to various actions that involve items. /// public delegate void DispatcherUnhandledExceptionFilterEventHandler(object sender, DispatcherUnhandledExceptionFilterEventArgs e); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _OSSOCK.cs
- InputLangChangeEvent.cs
- BmpBitmapEncoder.cs
- Unit.cs
- CollectionExtensions.cs
- FontSource.cs
- PowerStatus.cs
- HatchBrush.cs
- RulePatternOps.cs
- DescendentsWalker.cs
- _Events.cs
- TextTreeNode.cs
- _AutoWebProxyScriptWrapper.cs
- Calendar.cs
- Style.cs
- BinaryFormatter.cs
- TextElementEnumerator.cs
- ExpressionParser.cs
- VsPropertyGrid.cs
- SQLMoney.cs
- XmlCharacterData.cs
- InputReferenceExpression.cs
- PropertyGridCommands.cs
- _PooledStream.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- RTLAwareMessageBox.cs
- XmlSchemaInfo.cs
- NextPreviousPagerField.cs
- OleDbStruct.cs
- DataGrid.cs
- ContextItemManager.cs
- WorkflowMarkupSerializerMapping.cs
- GridViewSelectEventArgs.cs
- SkipQueryOptionExpression.cs
- BitmapMetadataBlob.cs
- ReadOnlyDictionary.cs
- DictionaryBase.cs
- XmlArrayAttribute.cs
- HtmlControlPersistable.cs
- PointKeyFrameCollection.cs
- sqlstateclientmanager.cs
- __Filters.cs
- SecurityManager.cs
- CommandCollectionEditor.cs
- XDeferredAxisSource.cs
- ProviderSettings.cs
- KeyFrames.cs
- Utils.cs
- ServiceReference.cs
- DataTransferEventArgs.cs
- TextDecoration.cs
- MiniModule.cs
- Condition.cs
- InstanceHandle.cs
- TreeNode.cs
- VScrollProperties.cs
- Configuration.cs
- PermissionSetTriple.cs
- CatalogPartCollection.cs
- TrackBarRenderer.cs
- ExternalException.cs
- DisplayMemberTemplateSelector.cs
- RoutedEventArgs.cs
- _KerberosClient.cs
- UndirectedGraph.cs
- DoubleUtil.cs
- FlowNode.cs
- DataSourceViewSchemaConverter.cs
- JsonSerializer.cs
- SqlRewriteScalarSubqueries.cs
- assertwrapper.cs
- SecurityHelper.cs
- Events.cs
- QilPatternVisitor.cs
- CallTemplateAction.cs
- GroupItem.cs
- LoginCancelEventArgs.cs
- BuildProvider.cs
- WindowPatternIdentifiers.cs
- ProjectedSlot.cs
- WebPartActionVerb.cs
- TypeInfo.cs
- XmlMemberMapping.cs
- ItemCollection.cs
- DbProviderFactories.cs
- SettingsContext.cs
- PipelineModuleStepContainer.cs
- WorkflowPersistenceService.cs
- SQLBinaryStorage.cs
- Delegate.cs
- StrokeNodeEnumerator.cs
- Rotation3DAnimationUsingKeyFrames.cs
- CustomServiceCredentials.cs
- ImageDrawing.cs
- AsynchronousChannel.cs
- GradientStopCollection.cs
- EpmSyndicationContentSerializer.cs
- DrawToolTipEventArgs.cs
- MinimizableAttributeTypeConverter.cs
- commandenforcer.cs