22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System . Collections . Generic ;
5+ using Microsoft . Extensions . Primitives ;
56
67namespace Microsoft . AspNetCore . Localization
78{
@@ -15,8 +16,8 @@ public class ProviderCultureResult
1516 /// <see cref="UICultures"/> properties set to the same culture value.
1617 /// </summary>
1718 /// <param name="culture">The name of the culture to be used for formatting, text, i.e. language.</param>
18- public ProviderCultureResult ( string culture )
19- : this ( new List < string > { culture } , new List < string > { culture } )
19+ public ProviderCultureResult ( StringSegment culture )
20+ : this ( new List < StringSegment > { culture } , new List < StringSegment > { culture } )
2021 {
2122 }
2223
@@ -26,8 +27,8 @@ public ProviderCultureResult(string culture)
2627 /// </summary>
2728 /// <param name="culture">The name of the culture to be used for formatting.</param>
2829 /// <param name="uiCulture"> The name of the ui culture to be used for text, i.e. language.</param>
29- public ProviderCultureResult ( string culture , string uiCulture )
30- : this ( new List < string > { culture } , new List < string > { uiCulture } )
30+ public ProviderCultureResult ( StringSegment culture , StringSegment uiCulture )
31+ : this ( new List < StringSegment > { culture } , new List < StringSegment > { uiCulture } )
3132 {
3233 }
3334
@@ -36,7 +37,7 @@ public ProviderCultureResult(string culture, string uiCulture)
3637 /// <see cref="UICultures"/> properties set to the same culture value.
3738 /// </summary>
3839 /// <param name="cultures">The list of cultures to be used for formatting, text, i.e. language.</param>
39- public ProviderCultureResult ( IList < string > cultures )
40+ public ProviderCultureResult ( IList < StringSegment > cultures )
4041 : this ( cultures , cultures )
4142 {
4243 }
@@ -47,7 +48,7 @@ public ProviderCultureResult(IList<string> cultures)
4748 /// </summary>
4849 /// <param name="cultures">The list of cultures to be used for formatting.</param>
4950 /// <param name="uiCultures">The list of ui cultures to be used for text, i.e. language.</param>
50- public ProviderCultureResult ( IList < string > cultures , IList < string > uiCultures )
51+ public ProviderCultureResult ( IList < StringSegment > cultures , IList < StringSegment > uiCultures )
5152 {
5253 Cultures = cultures ;
5354 UICultures = uiCultures ;
@@ -56,11 +57,11 @@ public ProviderCultureResult(IList<string> cultures, IList<string> uiCultures)
5657 /// <summary>
5758 /// Gets the list of cultures to be used for formatting.
5859 /// </summary>
59- public IList < string > Cultures { get ; }
60+ public IList < StringSegment > Cultures { get ; }
6061
6162 /// <summary>
6263 /// Gets the list of ui cultures to be used for text, i.e. language;
6364 /// </summary>
64- public IList < string > UICultures { get ; }
65+ public IList < StringSegment > UICultures { get ; }
6566 }
6667}
0 commit comments