Correctly detect relative Uri in package parts (#3630)
[mono.git] / mcs / class / WindowsBase / System.Windows.Threading / DispatcherFrame.cs
1 // 
2 // Permission is hereby granted, free of charge, to any person obtaining
3 // a copy of this software and associated documentation files (the
4 // "Software"), to deal in the Software without restriction, including
5 // without limitation the rights to use, copy, modify, merge, publish,
6 // distribute, sublicense, and/or sell copies of the Software, and to
7 // permit persons to whom the Software is furnished to do so, subject to
8 // the following conditions:
9 // 
10 // The above copyright notice and this permission notice shall be
11 // included in all copies or substantial portions of the Software.
12 // 
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 //
21 // Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
22 //
23 // Authors:
24 //      Miguel de Icaza (miguel@novell.com)
25
26 using System;
27 using System.Collections;
28 using System.Collections.Generic;
29 using System.Security;
30 using System.Threading;
31
32 namespace System.Windows.Threading {
33
34         public class DispatcherFrame : DispatcherObject  {
35                 DispatcherFrame parent_frame;
36                 
37                 internal bool exit_on_request;
38                 bool cont;
39                 internal Dispatcher dispatcher;
40                 
41                 public DispatcherFrame ()
42                 {
43                         exit_on_request = true;
44                         cont = true;
45                 }
46
47                 public DispatcherFrame (bool exitWhenRequested)
48                 {
49                         exit_on_request = exitWhenRequested;
50                         cont = true;
51                 }
52
53                 public bool Continue {
54                         get {
55                                 return cont;
56                         }
57
58                         [SecurityCritical]
59                         set {
60                                 cont = value;
61                         }
62                 }
63
64                 internal DispatcherFrame ParentFrame {
65                         get {
66                                 return parent_frame;
67                         }
68
69                         set {
70                                 parent_frame = value;
71                         }
72                 }
73         }
74 }