Beispiel #1
0
        public void Initilizes()
        {
            Assert.IsNotNull(provider);
            var l = provider.ProcessNames();

            Assert.IsInstanceOf <IEnumerable <string> >(l);
        }
Beispiel #2
0
 public void Execute()
 {
     try
     {
         Result = new ApiResult <IEnumerable <ProcessInformation> >
         {
             Content = systemProvider.ProcessNames(),
             Success = true,
             Message = "Ok"
         };
     }
     catch (Exception e)
     {
         Result = new ApiResult <IEnumerable <ProcessInformation> >
         {
             Content      = new ProcessInformation[0],
             Success      = false,
             Message      = "Failed to get process names",
             ErrorMessage = e.Message
         };
     }
 }