Beispiel #1
0
        private object GetPowerAppsEnvironmentsAsync(OperationRunner context)
        {
            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return((GetPowerAppsEnvironmentsResponse)client.GetEnvironmentsAsync().Result);
        }
        private object RemovePowerAppsEnvironmentAsync(OperationRunner context)
        {
            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.DeleteEnvironmentAsync(DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.EnvironmentName).Result);
        }
        private object GetPowerAppsEnvironmentLocationsAsync(OperationRunner context)
        {
            context.Logger.LogInformation("Getting PowerApps environments...");

            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.GetEnvironmentLocationsAsync().Result);
        }
        private object GetPowerAppsCdsDatabaseLanguagesAsync(OperationRunner context)
        {
            context.Logger.LogInformation("Getting PowerApps Common Data Services database languages...");

            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.GetCdsDatabaseLanguagesAsync(
                       DataModel.InstallationConfiguration.PowerApps.SelectedLocation).Result);
        }
Beispiel #5
0
        private object CreatePowerAppsEnvironmentAsync(OperationRunner context)
        {
            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.CreateEnvironmentAsync(new CreatePowerAppsEnvironmentRequest()
            {
                Location = DataModel.InstallationConfiguration.PowerApps.SelectedLocation,
                Properties = new NewPowerAppsEnvironmentProperties()
                {
                    DisplayName = DataModel.InstallationConfiguration.PowerApps.EnvironmentDisplayName,
                    EnvironmentSku = DataModel.InstallationConfiguration.PowerApps.SelectedSku,
                },
            }).Result);
        }
Beispiel #6
0
        private object CreatePowerAppsCdsDatabaseAsync(OperationRunner context)
        {
            PowerAppsClient client = new PowerAppsClient(WizardContext.TokenProvider);

            client.SetLogger(context.Logger);

            return(client.CreateCdsDatabase(
                       DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.EnvironmentName,
                       new CreatePowerAppsCdsDatabaseRequest()
            {
                BaseLanguage = DataModel.InstallationConfiguration.PowerApps.SelectedLanguage.LanguageName,
                Currency = new PowerAppsCdsDatabaseCurrencyMinimal()
                {
                    Code = DataModel.InstallationConfiguration.PowerApps.SelectedCurrency.CurrencyName,
                },
            }));
        }