Ejemplo n.º 1
0
 private static void Run(CommandLineArgs arguments)
 {
     if (!IsValid(arguments))
     {
         return;
     }
     if (arguments.Type.Length == 0)
     {
         var task1 = new PluginTask(CrmServiceClient, CurrentDirectory, PluginJson, arguments.Version);
         task1.Run();
         var task2 = new WorkflowTask(CrmServiceClient, CurrentDirectory, WorkflowJson, arguments.Version);
         task2.Run();
         var task3 = new WebResourceTask(CrmServiceClient, CurrentDirectory, WebResourceJson, arguments.Version);
         task3.Run();
     }
     else if (arguments.Type == TaskType.plugins.ToString())
     {
         var task = new PluginTask(CrmServiceClient, CurrentDirectory, PluginJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.workflows.ToString())
     {
         var task = new WorkflowTask(CrmServiceClient, CurrentDirectory, WorkflowJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.webresources.ToString())
     {
         var task = new WebResourceTask(CrmServiceClient, CurrentDirectory, WebResourceJson, arguments.Version);
         task.Run();
     }
 }
Ejemplo n.º 2
0
 private static void Run(CommandLineArgs arguments)
 {
     if (!IsValid(arguments))
     {
         return;
     }
     if (arguments.Type == TaskType.Plugins.ToString().ToLower())
     {
         var task = new PluginTask(CrmServiceClient, CurrentDirectory, PluginJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.Workflows.ToString().ToLower())
     {
         var task = new WorkflowTask(CrmServiceClient, CurrentDirectory, WorkflowJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.WebResources.ToString().ToLower())
     {
         var task = new WebResourceTask(CrmServiceClient, CurrentDirectory, WebResourceJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.SolutionPackagers.ToString().ToLower())
     {
         var task = new SolutionPackagerTask(CrmServiceClient, CurrentDirectory, SolutionPackagerJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.DataProviders.ToString().ToLower())
     {
         var task = new DataProviderTask(CrmServiceClient, CurrentDirectory, DataProviderJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.Generators.ToString().ToLower())
     {
         var task = new GeneratorTask(CrmServiceClient, CurrentDirectory, GeneratorJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.DownloadWebResources.ToString().ToLower())
     {
         var task = new DownloadWebResourceTask(CrmServiceClient, CurrentDirectory, DownloadWebResourceJson, arguments.Version, Path.Combine(CurrentDirectory, arguments.Json));
         task.Run();
     }
     else if (arguments.Type == TaskType.DownloadPortalWebResources.ToString().ToLower())
     {
         var task = new PortalTask(CrmServiceClient, CurrentDirectory, PortalJson, arguments.Version);
         task.Run();
     }
     else if (arguments.Type == TaskType.ProxyTypes.ToString().ToLower())
     {
         var task = new ProxyTypesTask(CrmServiceClient, CurrentDirectory, ProxyTypeJson, arguments.Version);
         task.Run();
     }
 }