public AimpActionResult <int, IList> GetFiles(IAimpTaskOwner owner) { return(new AimpActionResult <int, IList>(ActionResultType.OK, (int)PreimageFlags.None, new List <string> { Environment.GetFolderPath(Environment.SpecialFolder.MyMusic) })); }
public AimpActionResult Execute(IAimpTaskOwner owner) { TestContext.WriteLine($"Execute task. IsCanceled: {owner.IsCanceled}"); _action?.Invoke(); return(new AimpActionResult(ActionResultType.OK)); }
public AimpActionResult <int, IList> GetFiles(IAimpTaskOwner owner) { IList dataList = new List <string> { Environment.GetFolderPath(Environment.SpecialFolder.MyMusic) }; return(new AimpActionResult <int, IList>(ActionResultType.OK, 0, dataList)); }
public AimpActionResult Execute(IAimpTaskOwner owner) { if (!owner.IsCanceled) { System.Diagnostics.Debug.WriteLine("TestTask:\tExecute"); } if (!owner.IsCanceled) { System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); } return(new AimpActionResult(ActionResultType.OK)); }
public AimpActionResult Execute(IAimpTaskOwner owner) { return(Utils.TryCatch(_action) ? AimpActionResult.OK : AimpActionResult.Fail); }