mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
isolated clickonce dependancies
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace MediaBrowser.Common.Extensions
|
||||
{
|
||||
@@ -46,24 +45,6 @@ namespace MediaBrowser.Common.Extensions
|
||||
return val.Split(new[] { separator }, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes an action after a specified delay
|
||||
/// </summary>
|
||||
/// <param name="dispatcher">The dispatcher.</param>
|
||||
/// <param name="action">The action.</param>
|
||||
/// <param name="delayMs">The delay ms.</param>
|
||||
public static void InvokeWithDelay(this Dispatcher dispatcher, Action action, long delayMs)
|
||||
{
|
||||
var timer = new DispatcherTimer(DispatcherPriority.Normal, dispatcher);
|
||||
timer.Interval = TimeSpan.FromMilliseconds(delayMs);
|
||||
timer.Tick += (sender, args) =>
|
||||
{
|
||||
timer.Stop();
|
||||
action();
|
||||
};
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a non-blocking method to start a process and wait asynchronously for it to exit
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user