Browse Source

Renaming stuff

pull/261/head
Nikita Tsukanov 11 years ago
parent
commit
45da235507
  1. 2
      src/Gtk/Perspex.Gtk/GtkPlatform.cs
  2. 2
      src/Perspex.Base/Platform/IPlatformThreadingInterface.cs
  3. 2
      src/Perspex.Base/Threading/Dispatcher.cs
  4. 7
      src/Perspex.Base/Threading/SingleThreadDispatcher.cs
  5. 2
      src/Windows/Perspex.Win32/Win32Platform.cs

2
src/Gtk/Perspex.Gtk/GtkPlatform.cs

@ -81,7 +81,7 @@ namespace Perspex.Gtk
Gtk.Application.Invoke(delegate { Signaled?.Invoke(); }); Gtk.Application.Invoke(delegate { Signaled?.Invoke(); });
} }
public bool CheckForLoopThread() => Thread.CurrentThread == _uiThread; public bool CurrentThreadIsLoopThread => Thread.CurrentThread == _uiThread;
public event Action Signaled; public event Action Signaled;
} }

2
src/Perspex.Base/Platform/IPlatformThreadingInterface.cs

@ -26,7 +26,7 @@ namespace Perspex.Platform
/// </summary> /// </summary>
void Signal(); void Signal();
bool CheckForLoopThread(); bool CurrentThreadIsLoopThread { get; }
event Action Signaled; event Action Signaled;

2
src/Perspex.Base/Threading/Dispatcher.cs

@ -33,7 +33,7 @@ namespace Perspex.Threading
_platform.Signaled += _jobRunner.RunJobs; _platform.Signaled += _jobRunner.RunJobs;
} }
public bool CheckAccess() => _platform?.CheckForLoopThread() ?? true; public bool CheckAccess() => _platform?.CurrentThreadIsLoopThread() ?? true;
public void VerifyAccess() public void VerifyAccess()
{ {

7
src/Perspex.Base/Threading/SingleThreadDispatcher.cs

@ -37,11 +37,8 @@ namespace Perspex.Threading
() => _timerJobRunner.Post(tick, DispatcherPriority.Normal)); () => _timerJobRunner.Post(tick, DispatcherPriority.Normal));
public void Signal() => _evnt.Set(); public void Signal() => _evnt.Set();
public bool CheckForLoopThread() //TODO: Actually perform a check
{ public bool CurrentThreadIsLoopThread => true;
//TODO: Actually perform check
return true;
}
public event Action Signaled; public event Action Signaled;
} }

2
src/Windows/Perspex.Win32/Win32Platform.cs

@ -126,7 +126,7 @@ namespace Perspex.Win32
new IntPtr(SignalL)); new IntPtr(SignalL));
} }
public bool CheckForLoopThread() => _uiThread == Thread.CurrentThread; public bool CurrentThreadIsLoopThread => _uiThread == Thread.CurrentThread;
public event Action Signaled; public event Action Signaled;

Loading…
Cancel
Save