Exemplo n.º 1
0
 public static void List(ProjectionsManager manager, string[] commandArgs)
 {
     if (commandArgs.Length != 1 && commandArgs.Length != 3)
     {
         Log("Invalid argument value for list mode");
         return;
     }
     var userCredentials = commandArgs.Length == 3 ? new UserCredentials(commandArgs[1], commandArgs[2]) : null;
     var mode = commandArgs[0].Trim().ToLower();
     switch (mode)
     {
         case "all":
             Log("Listing all projections...");
             LogUnformatted(manager.ListAll(userCredentials));
             Log("All projections listed");
             break;
         case "onetime":
             Log("Listing onetime projections...");
             LogUnformatted(manager.ListOneTime(userCredentials));
             Log("Onetime projections listed");
             break;
         case "continuous":
             Log("Listing continuous projections...");
             LogUnformatted(manager.ListContinuous(userCredentials));
             Log("Continuous projections listed");
             break;
         default:
             Log("List mode not recognized");
             break;
     }
 }
Exemplo n.º 2
0
 Task <string> IProjectionsManagement.ListOneTimeAsync()
 {
     return(_projectionsManager.ListOneTime());
 }