Esempio n. 1
0
        private async void Deploy_Execute(object sender, ExecutedRoutedEventArgs e)
        {
            var proj = this.Model.SelectedProject;

            if (proj == null)
            {
                MessageBox.Show("대상 프로젝트를 찾을 수 없습니다.", "DeXign", MessageBoxButton.OK);
                return;
            }

            this.BeginDebugging("업로드중...");

            await t.Task.Delay(200);

            // 저장
            proj.Save();

            var jsLogicUnit = new LogicGeneratorUnit(GlobalModel.Instance.SelectedProject.ServerComponents);
            var jsGenerator = new JSGenerator(jsLogicUnit, null, null);

            string[] jsFunctions = jsGenerator.Generate().ToArray();

            for (int i = 0; i < jsFunctions.Length; i++)
            {
                var res = await DXLambda.Deploy(GlobalModel.Instance.User, jsFunctions[i]);

                GlobalModel.Instance.CompileProgress = (i + 1d) / jsFunctions.Length;
            }

            this.EndDebugging();

            await t.Task.Delay(200);

            GlobalModel.Instance.IsDebugging = false;
        }
Esempio n. 2
0
        private async void LambdaStorePage_Loaded(object sender, RoutedEventArgs e)
        {
            var res = await DXLambda.GetLambdaInfos();

            if (res.Status == APIResponseStatus.Success)
            {
                header.Text             = $"{res.Infos.Length} rest apis found";
                apiListView.ItemsSource = res.Infos;
            }
        }
Esempio n. 3
0
        private static async void Run()
        {
            var res = await DXLambda.GetLambdaInfos();

            foreach (var info in res.Infos)
            {
                Console.WriteLine($"Func: {info.FunctionName}");
                Console.WriteLine($"Owner: {info.Email}");
                Console.WriteLine($"CreateDate: {info.CreateDate}");
                Console.WriteLine($"Parameters: [{string.Join(", ", info.Parameters)}]");
                Console.WriteLine($"JS: {info.Javascript}");
                Console.WriteLine();
            }
        }