blob: 7fc5fbfe1043c651f285d3ffd5ce138b529edc63 (
plain)
| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 20 00 00 00 20 08 06 00 00 00 73 7a 7a | .PNG........IHDR.............szz |
| 0020 | f4 00 00 00 04 73 42 49 54 08 08 08 08 7c 08 64 88 00 00 00 09 70 48 59 73 00 00 00 dd 00 00 00 | .....sBIT....|.d.....pHYs....... |
| 0040 | dd 01 70 53 a2 07 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 | ..pS......tEXtSoftware.www.inksc |
| 0060 | 61 70 65 2e 6f 72 67 9b ee 3c 1a 00 00 05 05 49 44 41 54 58 85 c5 97 5d 6c 14 55 14 c7 7f 77 66 | ape.org..<.....IDATX...]l.U...wf |
| 0080 | 76 76 bb f4 1b 0a bb 14 c3 57 03 d2 88 21 14 28 52 ad 05 89 7c 26 54 12 7d d0 6a 1a 4d fc 88 a9 | vv.......W...!.(R...|&T.}.j.M... |
| 00a0 | 91 98 90 18 09 0f 04 13 13 03 24 e8 03 0f 26 96 d0 c2 83 21 b1 92 f4 41 13 81 06 52 69 83 96 0f | ...using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Threading;
using Tango.MachineStudio.Common.Threading;
namespace Tango.MachineStudio.UI.Threading
{
/// <summary>
/// Represents the default PPC <see cref="IDispatcherProvider"/> which will invoke action on the current application dispatcher.
/// </summary>
/// <seealso cref="Tango.PPC.Common.Threading.IDispatcherProvider" />
public class DefaultDispatcherProvider : IDispatcherProvider
{
private Dispatcher _dispatcher;
/// <summary>
/// Initializes a new instance of the <see cref="DefaultDispatcherProvider"/> class.
/// </summary>
/// <param name="dispatcher">The dispatcher.</param>
public DefaultDispatcherProvider(Dispatcher dispatcher)
{
_dispatcher = dispatcher;
}
/// <summary>
/// Invokes the specified action asynchronously.
/// </summary>
/// <param name="action">The action.</param>
public void Invoke(Action action)
{
_dispatcher.BeginInvoke(action);
}
/// <summary>
/// Invokes the specified action synchronously.
/// </summary>
/// <param name="action">The action.</param>
public void InvokeSync(Action action)
{
_dispatcher.Invoke(action);
}
}
}
|