public async Task ProcessAsync()

in code/src/CoreTemplateStudio/CoreTemplateStudio.Cli/Services/SyncService.cs [31:80]


        public async Task<SyncModel> ProcessAsync(string path, string fullPath, string platform, string language)
        {
            try
            {
#if DEBUG
                GenContext.Bootstrap(
                    new LocalTemplatesSource(
                        path,
                        "0.0.0.0",
                        string.Empty),
                    new CliGenShell(_messageService),
                    new Version("0.0.0.0"),
                    platform,
                    language);
#else
                GenContext.Bootstrap(
                  new RemoteTemplatesSource(
                      platform,
                      language,
                      path,
                      new CliDigitalSignatureService()),
                  new CliGenShell(_messageService),
                  new Version(GetFileVersion()),
                  platform,
                  language);
#endif
                GenContext.ToolBox.Repo.Sync.SyncStatusChanged += OnSyncStatusChanged;
                await GenContext.ToolBox.Repo.SynchronizeAsync(true);

                if (!string.IsNullOrEmpty(GenContext.ToolBox.Repo.CurrentContentFolder))
                {
                    return new SyncModel()
                    {
                        TemplatesVersion = GenContext.ToolBox.TemplatesVersion,
                        WasUpdated = _wasUpdated,
                        ProjectNameValidationConfig = GenContext.ToolBox.Repo.ProjectNameValidationConfig,
                        ItemNameValidationConfig = GenContext.ToolBox.Repo.ItemNameValidationConfig,
                        DefaultNames = GetDefaultNames(),
                    };
                }
                else
                {
                    throw new Exception(StringRes.ErrorSyncingTemplatesNoContentFolder);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format(StringRes.ErrorSyncingTemplates, ex.Message), ex);
            }
        }