From 162d650c6c980885b3de82a331c4494e33b56c6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:31:12 -0700 Subject: [PATCH] Country -> CountryRegion (#58280) Co-authored-by: wtgodbe --- .../Factories/ComplexTypeConverterFactory.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs b/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs index 09df61c18329..7f5ec9973c75 100644 --- a/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs +++ b/src/Components/Endpoints/src/FormMapping/Factories/ComplexTypeConverterFactory.cs @@ -27,7 +27,7 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // We are going to compile a function that maps all the properties for the type. // Beware that the code below is not the actual exact code, just a simplification to understand what is happening at a high level. - // The general flow is as follows. For a type like Address { Street, City, Country, ZipCode } + // The general flow is as follows. For a type like Address { Street, City, CountryRegion, ZipCode } // we will generate a function that looks like: // public bool TryRead(ref FormDataReader reader, Type type, FormDataSerializerOptions options, out Address? result, out bool found) // { @@ -35,11 +35,11 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // bool succeeded = true; // string street; // string city; - // string country; + // string countryRegion; // string zipCode; // FormDataConveter streetConverter; // FormDataConveter cityConverter; - // FormDataConveter countryConverter; + // FormDataConveter countryRegionConverter; // FormDataConveter zipCodeConverter; // var streetConverter = options.ResolveConverter(typeof(string)); @@ -54,11 +54,11 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // found ||= foundProperty; // reader.PopPrefix("City"); // - // var countryConverter = options.ResolveConverter(typeof(string)); - // reader.PushPrefix("Country"); - // succeeded &= countryConverter.TryRead(ref reader, typeof(string), options, out street, out foundProperty); + // var countryRegionConverter = options.ResolveConverter(typeof(string)); + // reader.PushPrefix("CountryRegion"); + // succeeded &= countryRegionConverter.TryRead(ref reader, typeof(string), options, out street, out foundProperty); // found ||= foundProperty; - // reader.PopPrefix("Country"); + // reader.PopPrefix("CountryRegion"); // // var zipCodeConverter = options.ResolveConverter(typeof(string)); // reader.PushPrefix("ZipCode"); @@ -71,7 +71,7 @@ public bool CanConvert(Type type, FormDataMapperOptions options) // result = new Address(); // result.Street = street; // result.City = city; - // result.Country = country; + // result.CountryRegion = countryRegion; // result.ZipCode = zipCode; // } // else