Skip to content

Commit

Permalink
Update ExceptionHandlingSecondaryUIThread to shutdown Dispatcher (mic…
Browse files Browse the repository at this point in the history
…rosoft#59)

* Update ExceptionHandlingSecondaryUIThread to shutdown Dispatcher when Window is closed

* SecondaryUIThreadWindow.cs formatting: Tabs to Spaces

* Add root `.editorconfig` with settings for C# files

* Remove default header of .editor config file
  • Loading branch information
augustoproiete authored and vatsan-madhavan committed Oct 16, 2019
1 parent 331571d commit 63450e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# top-most EditorConfig file
root = true

[*.cs]
end_of_line = crlf
indent_style = space
indent_size = 4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void raiseExceptionOnSecondaryUIThreadButton_Click(object sender, Routed
throw new Exception(msg);
}

private void SecondaryUiThreadWindow_Closed(object sender, EventArgs e)
private void SecondaryUIThreadWindow_OnClosed(object sender, EventArgs e)
{
// End this thread of execution
Dispatcher.InvokeShutdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ExceptionHandlingSecondaryUIThread"
mc:Ignorable="d"
Title="SecondaryUIThreadWindow" Height="300" Width="300">
Title="SecondaryUIThreadWindow" Height="300" Width="300"
Closed="SecondaryUIThreadWindow_OnClosed">
<Grid>
<Button Click="raiseExceptionOnSecondaryUIThreadButton_Click">Raise an Exception on the Secondary UI Thread</Button>
</Grid>
Expand Down

0 comments on commit 63450e7

Please sign in to comment.