Skip to content

Commit 1a3c5c4

Browse files
committed
1.1.8.1
1 parent eaa53db commit 1a3c5c4

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

86.7 KB
Binary file not shown.
-86.7 KB
Binary file not shown.

Blazor.WebForm.Components/Base/ControlParameterViewComponentExtensions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.Collections.Specialized;
55
using System.ComponentModel;
6+
using System.Globalization;
67
using System.Linq;
78
using System.Runtime.CompilerServices;
89
using System.Text;
@@ -124,24 +125,24 @@ public static void SetEventProperty<TEventArgs>(this IParameterViewComponent com
124125

125126
public static string ConvertToString<TValue>(this IParameterViewComponent component, TValue value)
126127
{
127-
return TypeDescriptor.GetConverter(typeof(TValue)).ConvertToString(value);
128+
return TypeDescriptor.GetConverter(typeof(TValue)).ConvertToString(null, CultureInfo.InvariantCulture, value);
128129
}
129130

130131
public static TValue ConvertFromString<TValue>(this IParameterViewComponent component, string value)
131132
{
132-
return (TValue)TypeDescriptor.GetConverter(typeof(TValue)).ConvertFromString(value);
133+
return (TValue)TypeDescriptor.GetConverter(typeof(TValue)).ConvertFromString(null, CultureInfo.InvariantCulture, value);
133134
}
134135

135136
public static string ConvertToString<TConverter, TValue>(this IParameterViewComponent component, TValue value)
136137
where TConverter : TypeConverter, new()
137138
{
138-
return new TConverter().ConvertToString(value);
139+
return new TConverter().ConvertToString(null, CultureInfo.InvariantCulture, value);
139140
}
140141

141142
public static TValue ConvertFromString<TConverter, TValue>(this IParameterViewComponent component, string value)
142143
where TConverter : TypeConverter, new()
143144
{
144-
return (TValue)new TConverter().ConvertFromString(value);
145+
return (TValue)new TConverter().ConvertFromString(null, CultureInfo.InvariantCulture, value);
145146
}
146147

147148
public static ITemplate GetTemplateProperty(this IParameterViewComponent component, RenderFragment value)

Blazor.WebForm.Components/Blazor.WebForm.Components.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net5.0</TargetFramework>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>Blazor.WebForm.Components.pfx</AssemblyOriginatorKeyFile>
7-
<Version>1.1.8.0</Version>
7+
<Version>1.1.8.1</Version>
88
<RootNamespace>asp</RootNamespace>
99
<Copyright>Jurio li</Copyright>
1010
<AssemblyName>Blazor.WebForm.Components</AssemblyName>
@@ -17,7 +17,7 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="Applied" Version="1.2.1.5" />
20-
<PackageReference Include="Blazor.WebForm.UI" Version="1.1.8" />
20+
<PackageReference Include="Blazor.WebForm.UI" Version="1.1.8.1" />
2121
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.8" />
2222
</ItemGroup>
2323

Blazor.WebForm.Components/Inner/Base/PropertyComponent.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Text;
66
using System.Threading.Tasks;
77
using TypeConverter = System.ComponentModel.TypeConverter;
8-
using TypeDescriptor = System.ComponentModel.TypeDescriptor;
98

109
namespace Blazor.WebForm.UI.PropertyComponents
1110
{

0 commit comments

Comments
 (0)