|
@@ -10,7 +10,6 @@ using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Common.Extensions;
|
|
using MediaBrowser.Common.Extensions;
|
|
using MediaBrowser.Common.Progress;
|
|
using MediaBrowser.Common.Progress;
|
|
using MediaBrowser.Model.Events;
|
|
using MediaBrowser.Model.Events;
|
|
-using MediaBrowser.Model.IO;
|
|
|
|
using MediaBrowser.Model.Serialization;
|
|
using MediaBrowser.Model.Serialization;
|
|
using MediaBrowser.Model.Tasks;
|
|
using MediaBrowser.Model.Tasks;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Logging;
|
|
@@ -22,37 +21,53 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// </summary>
|
|
/// </summary>
|
|
public class ScheduledTaskWorker : IScheduledTaskWorker
|
|
public class ScheduledTaskWorker : IScheduledTaskWorker
|
|
{
|
|
{
|
|
- public event EventHandler<GenericEventArgs<double>> TaskProgress;
|
|
|
|
-
|
|
|
|
- /// <summary>
|
|
|
|
- /// Gets the scheduled task.
|
|
|
|
- /// </summary>
|
|
|
|
- /// <value>The scheduled task.</value>
|
|
|
|
- public IScheduledTask ScheduledTask { get; private set; }
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Gets or sets the json serializer.
|
|
/// Gets or sets the json serializer.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The json serializer.</value>
|
|
/// <value>The json serializer.</value>
|
|
- private IJsonSerializer JsonSerializer { get; set; }
|
|
|
|
|
|
+ private readonly IJsonSerializer _jsonSerializer;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Gets or sets the application paths.
|
|
/// Gets or sets the application paths.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The application paths.</value>
|
|
/// <value>The application paths.</value>
|
|
- private IApplicationPaths ApplicationPaths { get; set; }
|
|
|
|
|
|
+ private readonly IApplicationPaths _applicationPaths;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Gets the logger.
|
|
|
|
|
|
+ /// Gets or sets the logger.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The logger.</value>
|
|
/// <value>The logger.</value>
|
|
- private ILogger Logger { get; set; }
|
|
|
|
|
|
+ private readonly ILogger _logger;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Gets the task manager.
|
|
|
|
|
|
+ /// Gets or sets the task manager.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The task manager.</value>
|
|
/// <value>The task manager.</value>
|
|
- private ITaskManager TaskManager { get; set; }
|
|
|
|
|
|
+ private readonly ITaskManager _taskManager;
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The _last execution result sync lock.
|
|
|
|
+ /// </summary>
|
|
|
|
+ private readonly object _lastExecutionResultSyncLock = new object();
|
|
|
|
+
|
|
|
|
+ private bool _readFromFile = false;
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The _last execution result.
|
|
|
|
+ /// </summary>
|
|
|
|
+ private TaskResult _lastExecutionResult;
|
|
|
|
+
|
|
|
|
+ private Task _currentTask;
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The _triggers.
|
|
|
|
+ /// </summary>
|
|
|
|
+ private Tuple<TaskTriggerInfo, ITaskTrigger>[] _triggers;
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The _id.
|
|
|
|
+ /// </summary>
|
|
|
|
+ private string _id;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ScheduledTaskWorker" /> class.
|
|
/// Initializes a new instance of the <see cref="ScheduledTaskWorker" /> class.
|
|
@@ -71,7 +86,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// or
|
|
/// or
|
|
/// jsonSerializer
|
|
/// jsonSerializer
|
|
/// or
|
|
/// or
|
|
- /// logger
|
|
|
|
|
|
+ /// logger.
|
|
/// </exception>
|
|
/// </exception>
|
|
public ScheduledTaskWorker(IScheduledTask scheduledTask, IApplicationPaths applicationPaths, ITaskManager taskManager, IJsonSerializer jsonSerializer, ILogger logger)
|
|
public ScheduledTaskWorker(IScheduledTask scheduledTask, IApplicationPaths applicationPaths, ITaskManager taskManager, IJsonSerializer jsonSerializer, ILogger logger)
|
|
{
|
|
{
|
|
@@ -101,23 +116,22 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
}
|
|
}
|
|
|
|
|
|
ScheduledTask = scheduledTask;
|
|
ScheduledTask = scheduledTask;
|
|
- ApplicationPaths = applicationPaths;
|
|
|
|
- TaskManager = taskManager;
|
|
|
|
- JsonSerializer = jsonSerializer;
|
|
|
|
- Logger = logger;
|
|
|
|
|
|
+ _applicationPaths = applicationPaths;
|
|
|
|
+ _taskManager = taskManager;
|
|
|
|
+ _jsonSerializer = jsonSerializer;
|
|
|
|
+ _logger = logger;
|
|
|
|
|
|
InitTriggerEvents();
|
|
InitTriggerEvents();
|
|
}
|
|
}
|
|
|
|
|
|
- private bool _readFromFile = false;
|
|
|
|
- /// <summary>
|
|
|
|
- /// The _last execution result.
|
|
|
|
- /// </summary>
|
|
|
|
- private TaskResult _lastExecutionResult;
|
|
|
|
|
|
+ public event EventHandler<GenericEventArgs<double>> TaskProgress;
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// The _last execution result sync lock.
|
|
|
|
|
|
+ /// Gets the scheduled task.
|
|
/// </summary>
|
|
/// </summary>
|
|
- private readonly object _lastExecutionResultSyncLock = new object();
|
|
|
|
|
|
+ /// <value>The scheduled task.</value>
|
|
|
|
+ public IScheduledTask ScheduledTask { get; private set; }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Gets the last execution result.
|
|
/// Gets the last execution result.
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -136,11 +150,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- _lastExecutionResult = JsonSerializer.DeserializeFromFile<TaskResult>(path);
|
|
|
|
|
|
+ _lastExecutionResult = _jsonSerializer.DeserializeFromFile<TaskResult>(path);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- Logger.LogError(ex, "Error deserializing {File}", path);
|
|
|
|
|
|
+ _logger.LogError(ex, "Error deserializing {File}", path);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -160,7 +174,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
|
|
|
|
lock (_lastExecutionResultSyncLock)
|
|
lock (_lastExecutionResultSyncLock)
|
|
{
|
|
{
|
|
- JsonSerializer.SerializeToFile(value, path);
|
|
|
|
|
|
+ _jsonSerializer.SerializeToFile(value, path);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -184,7 +198,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
public string Category => ScheduledTask.Category;
|
|
public string Category => ScheduledTask.Category;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// Gets the current cancellation token.
|
|
|
|
|
|
+ /// Gets or sets the current cancellation token.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The current cancellation token source.</value>
|
|
/// <value>The current cancellation token source.</value>
|
|
private CancellationTokenSource CurrentCancellationTokenSource { get; set; }
|
|
private CancellationTokenSource CurrentCancellationTokenSource { get; set; }
|
|
@@ -221,12 +235,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
public double? CurrentProgress { get; private set; }
|
|
public double? CurrentProgress { get; private set; }
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// The _triggers.
|
|
|
|
- /// </summary>
|
|
|
|
- private Tuple<TaskTriggerInfo, ITaskTrigger>[] _triggers;
|
|
|
|
-
|
|
|
|
- /// <summary>
|
|
|
|
- /// Gets the triggers that define when the task will run.
|
|
|
|
|
|
+ /// Gets or sets the triggers that define when the task will run.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The triggers.</value>
|
|
/// <value>The triggers.</value>
|
|
private Tuple<TaskTriggerInfo, ITaskTrigger>[] InternalTriggers
|
|
private Tuple<TaskTriggerInfo, ITaskTrigger>[] InternalTriggers
|
|
@@ -255,7 +264,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// Gets the triggers that define when the task will run.
|
|
/// Gets the triggers that define when the task will run.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The triggers.</value>
|
|
/// <value>The triggers.</value>
|
|
- /// <exception cref="ArgumentNullException">value</exception>
|
|
|
|
|
|
+ /// <exception cref="ArgumentNullException"><c>value</c> is <c>null</c>.</exception>
|
|
public TaskTriggerInfo[] Triggers
|
|
public TaskTriggerInfo[] Triggers
|
|
{
|
|
{
|
|
get
|
|
get
|
|
@@ -280,11 +289,6 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// The _id.
|
|
|
|
- /// </summary>
|
|
|
|
- private string _id;
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Gets the unique id.
|
|
/// Gets the unique id.
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -325,9 +329,9 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
|
|
|
|
trigger.Stop();
|
|
trigger.Stop();
|
|
|
|
|
|
- trigger.Triggered -= trigger_Triggered;
|
|
|
|
- trigger.Triggered += trigger_Triggered;
|
|
|
|
- trigger.Start(LastExecutionResult, Logger, Name, isApplicationStartup);
|
|
|
|
|
|
+ trigger.Triggered -= OnTriggerTriggered;
|
|
|
|
+ trigger.Triggered += OnTriggerTriggered;
|
|
|
|
+ trigger.Start(LastExecutionResult, _logger, Name, isApplicationStartup);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -336,7 +340,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="sender">The source of the event.</param>
|
|
/// <param name="sender">The source of the event.</param>
|
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
|
- async void trigger_Triggered(object sender, EventArgs e)
|
|
|
|
|
|
+ private async void OnTriggerTriggered(object sender, EventArgs e)
|
|
{
|
|
{
|
|
var trigger = (ITaskTrigger)sender;
|
|
var trigger = (ITaskTrigger)sender;
|
|
|
|
|
|
@@ -347,19 +351,17 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- Logger.LogInformation("{0} fired for task: {1}", trigger.GetType().Name, Name);
|
|
|
|
|
|
+ _logger.LogInformation("{0} fired for task: {1}", trigger.GetType().Name, Name);
|
|
|
|
|
|
trigger.Stop();
|
|
trigger.Stop();
|
|
|
|
|
|
- TaskManager.QueueScheduledTask(ScheduledTask, trigger.TaskOptions);
|
|
|
|
|
|
+ _taskManager.QueueScheduledTask(ScheduledTask, trigger.TaskOptions);
|
|
|
|
|
|
await Task.Delay(1000).ConfigureAwait(false);
|
|
await Task.Delay(1000).ConfigureAwait(false);
|
|
|
|
|
|
- trigger.Start(LastExecutionResult, Logger, Name, false);
|
|
|
|
|
|
+ trigger.Start(LastExecutionResult, _logger, Name, false);
|
|
}
|
|
}
|
|
|
|
|
|
- private Task _currentTask;
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Executes the task.
|
|
/// Executes the task.
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -395,9 +397,9 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
|
|
|
|
CurrentCancellationTokenSource = new CancellationTokenSource();
|
|
CurrentCancellationTokenSource = new CancellationTokenSource();
|
|
|
|
|
|
- Logger.LogInformation("Executing {0}", Name);
|
|
|
|
|
|
+ _logger.LogInformation("Executing {0}", Name);
|
|
|
|
|
|
- ((TaskManager)TaskManager).OnTaskExecuting(this);
|
|
|
|
|
|
+ ((TaskManager)_taskManager).OnTaskExecuting(this);
|
|
|
|
|
|
progress.ProgressChanged += OnProgressChanged;
|
|
progress.ProgressChanged += OnProgressChanged;
|
|
|
|
|
|
@@ -423,7 +425,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- Logger.LogError(ex, "Error");
|
|
|
|
|
|
+ _logger.LogError(ex, "Error");
|
|
|
|
|
|
failureException = ex;
|
|
failureException = ex;
|
|
|
|
|
|
@@ -476,7 +478,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
if (State == TaskState.Running)
|
|
if (State == TaskState.Running)
|
|
{
|
|
{
|
|
- Logger.LogInformation("Attempting to cancel Scheduled Task {0}", Name);
|
|
|
|
|
|
+ _logger.LogInformation("Attempting to cancel Scheduled Task {0}", Name);
|
|
CurrentCancellationTokenSource.Cancel();
|
|
CurrentCancellationTokenSource.Cancel();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -487,7 +489,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// <returns>System.String.</returns>
|
|
/// <returns>System.String.</returns>
|
|
private string GetScheduledTasksConfigurationDirectory()
|
|
private string GetScheduledTasksConfigurationDirectory()
|
|
{
|
|
{
|
|
- return Path.Combine(ApplicationPaths.ConfigurationDirectoryPath, "ScheduledTasks");
|
|
|
|
|
|
+ return Path.Combine(_applicationPaths.ConfigurationDirectoryPath, "ScheduledTasks");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -496,7 +498,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// <returns>System.String.</returns>
|
|
/// <returns>System.String.</returns>
|
|
private string GetScheduledTasksDataDirectory()
|
|
private string GetScheduledTasksDataDirectory()
|
|
{
|
|
{
|
|
- return Path.Combine(ApplicationPaths.DataPath, "ScheduledTasks");
|
|
|
|
|
|
+ return Path.Combine(_applicationPaths.DataPath, "ScheduledTasks");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -535,7 +537,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
TaskTriggerInfo[] list = null;
|
|
TaskTriggerInfo[] list = null;
|
|
if (File.Exists(path))
|
|
if (File.Exists(path))
|
|
{
|
|
{
|
|
- list = JsonSerializer.DeserializeFromFile<TaskTriggerInfo[]>(path);
|
|
|
|
|
|
+ list = _jsonSerializer.DeserializeFromFile<TaskTriggerInfo[]>(path);
|
|
}
|
|
}
|
|
|
|
|
|
// Return defaults if file doesn't exist.
|
|
// Return defaults if file doesn't exist.
|
|
@@ -571,7 +573,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
|
|
|
|
|
- JsonSerializer.SerializeToFile(triggers, path);
|
|
|
|
|
|
+ _jsonSerializer.SerializeToFile(triggers, path);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -585,7 +587,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
var elapsedTime = endTime - startTime;
|
|
var elapsedTime = endTime - startTime;
|
|
|
|
|
|
- Logger.LogInformation("{0} {1} after {2} minute(s) and {3} seconds", Name, status, Math.Truncate(elapsedTime.TotalMinutes), elapsedTime.Seconds);
|
|
|
|
|
|
+ _logger.LogInformation("{0} {1} after {2} minute(s) and {3} seconds", Name, status, Math.Truncate(elapsedTime.TotalMinutes), elapsedTime.Seconds);
|
|
|
|
|
|
var result = new TaskResult
|
|
var result = new TaskResult
|
|
{
|
|
{
|
|
@@ -606,7 +608,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
|
|
|
|
LastExecutionResult = result;
|
|
LastExecutionResult = result;
|
|
|
|
|
|
- ((TaskManager)TaskManager).OnTaskCompleted(this, result);
|
|
|
|
|
|
+ ((TaskManager)_taskManager).OnTaskCompleted(this, result);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -615,6 +617,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
public void Dispose()
|
|
public void Dispose()
|
|
{
|
|
{
|
|
Dispose(true);
|
|
Dispose(true);
|
|
|
|
+ GC.SuppressFinalize(this);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -635,12 +638,12 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- Logger.LogInformation(Name + ": Cancelling");
|
|
|
|
|
|
+ _logger.LogInformation(Name + ": Cancelling");
|
|
token.Cancel();
|
|
token.Cancel();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- Logger.LogError(ex, "Error calling CancellationToken.Cancel();");
|
|
|
|
|
|
+ _logger.LogError(ex, "Error calling CancellationToken.Cancel();");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -649,21 +652,21 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- Logger.LogInformation(Name + ": Waiting on Task");
|
|
|
|
|
|
+ _logger.LogInformation(Name + ": Waiting on Task");
|
|
var exited = Task.WaitAll(new[] { task }, 2000);
|
|
var exited = Task.WaitAll(new[] { task }, 2000);
|
|
|
|
|
|
if (exited)
|
|
if (exited)
|
|
{
|
|
{
|
|
- Logger.LogInformation(Name + ": Task exited");
|
|
|
|
|
|
+ _logger.LogInformation(Name + ": Task exited");
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- Logger.LogInformation(Name + ": Timed out waiting for task to stop");
|
|
|
|
|
|
+ _logger.LogInformation(Name + ": Timed out waiting for task to stop");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- Logger.LogError(ex, "Error calling Task.WaitAll();");
|
|
|
|
|
|
+ _logger.LogError(ex, "Error calling Task.WaitAll();");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -671,12 +674,12 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- Logger.LogDebug(Name + ": Disposing CancellationToken");
|
|
|
|
|
|
+ _logger.LogDebug(Name + ": Disposing CancellationToken");
|
|
token.Dispose();
|
|
token.Dispose();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- Logger.LogError(ex, "Error calling CancellationToken.Dispose();");
|
|
|
|
|
|
+ _logger.LogError(ex, "Error calling CancellationToken.Dispose();");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -692,8 +695,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="info">The info.</param>
|
|
/// <param name="info">The info.</param>
|
|
/// <returns>BaseTaskTrigger.</returns>
|
|
/// <returns>BaseTaskTrigger.</returns>
|
|
- /// <exception cref="ArgumentNullException"></exception>
|
|
|
|
- /// <exception cref="ArgumentException">Invalid trigger type: + info.Type</exception>
|
|
|
|
|
|
+ /// <exception cref="ArgumentException">Invalid trigger type: + info.Type.</exception>
|
|
private ITaskTrigger GetTrigger(TaskTriggerInfo info)
|
|
private ITaskTrigger GetTrigger(TaskTriggerInfo info)
|
|
{
|
|
{
|
|
var options = new TaskOptions
|
|
var options = new TaskOptions
|
|
@@ -765,7 +767,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|
foreach (var triggerInfo in InternalTriggers)
|
|
foreach (var triggerInfo in InternalTriggers)
|
|
{
|
|
{
|
|
var trigger = triggerInfo.Item2;
|
|
var trigger = triggerInfo.Item2;
|
|
- trigger.Triggered -= trigger_Triggered;
|
|
|
|
|
|
+ trigger.Triggered -= OnTriggerTriggered;
|
|
trigger.Stop();
|
|
trigger.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|