Exemplo n.º 1
0
 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)
     }));
 }
Exemplo n.º 2
0
            public AimpActionResult Execute(IAimpTaskOwner owner)
            {
                TestContext.WriteLine($"Execute task. IsCanceled: {owner.IsCanceled}");
                _action?.Invoke();

                return(new AimpActionResult(ActionResultType.OK));
            }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
 public AimpActionResult Execute(IAimpTaskOwner owner)
 {
     return(Utils.TryCatch(_action) ? AimpActionResult.OK : AimpActionResult.Fail);
 }