private async Task CompleteMissingFields()

in CSharp/BotBuilderLocation/Dialogs/LocationRequiredFieldsDialog.cs [40:54]


        private async Task CompleteMissingFields(IDialogContext context)
        {
            bool notComplete =
                await this.CompleteFieldIfMissing(context, this.ResourceManager.StreetAddress, LocationRequiredFields.StreetAddress, "AddressLine", this.location.Address.AddressLine)
                || await this.CompleteFieldIfMissing(context, this.ResourceManager.Locality, LocationRequiredFields.Locality, "Locality", this.location.Address.Locality)
                || await this.CompleteFieldIfMissing(context, this.ResourceManager.Region, LocationRequiredFields.Region, "AdminDistrict", this.location.Address.AdminDistrict)
                || await this.CompleteFieldIfMissing(context, this.ResourceManager.PostalCode, LocationRequiredFields.PostalCode, "PostalCode", this.location.Address.PostalCode)
                || await this.CompleteFieldIfMissing(context, this.ResourceManager.Country, LocationRequiredFields.Country, "CountryRegion", this.location.Address.CountryRegion);

            if (!notComplete)
            {
                var result = new LocationDialogResponse(this.location);
                context.Done(result);
            }
        }