Exemplo n.º 1
0
        private async Task <string> GetConfigurationProfileSummary(Application application, string configurationName)
        {
            var cfgProfile = await _configurationProfileService.Get(application.Id, configurationName);

            if (cfgProfile == null)
            {
                Console.WriteLine($"Can't find configuration [{configurationName}] for application [{application.Name}]. Creating the profile");

                var newProfile = await _client.CreateConfigurationProfileAsync(new CreateConfigurationProfileRequest
                {
                    ApplicationId = application.Id,
                    Name          = configurationName,
                    LocationUri   = "hosted"
                });

                return(newProfile.Id);
            }

            return(cfgProfile.Id);
        }