Skip to content

Commit 162b699

Browse files
committed
Merge branch 'main' into QueryPageOptions_json
2 parents 439ea73 + ace10cf commit 162b699

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

scripts/linux/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ sudo dpkg -i packages-microsoft-prod.deb
4949
rm packages-microsoft-prod.deb
5050

5151
sudo apt-get update && \
52-
sudo apt-get install -y dotnet-sdk-9.0
52+
sudo apt-get install -y dotnet-sdk-10.0

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>10.1.4-beta03</Version>
4+
<Version>10.1.4-beta04</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Button/CountButton.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -36,6 +36,7 @@ protected override async Task OnClickButton()
3636
IsAsyncLoading = true;
3737
IsDisabled = true;
3838

39+
await Task.Yield();
3940
await HandlerClick();
4041
await UpdateCount();
4142

src/BootstrapBlazor/Extensions/LambdaExtensions.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,17 @@ private static ConditionalExpression BuildPropertyAccess(Expression instance, Ty
676676
var p = instanceType.GetPropertyByName(propertyName) ?? throw new InvalidOperationException($"类型 {instanceType.Name} 未找到 {propertyName} 属性,无法获取其值");
677677

678678
var propertyAccess = Expression.Property(instance, p);
679-
return Expression.Condition(
680-
test: Expression.Equal(instance, Expression.Constant(null, instanceType)),
681-
ifTrue: Expression.Constant(null, p.PropertyType),
682-
ifFalse: propertyAccess
683-
);
679+
return p.PropertyType.IsValueType
680+
? Expression.Condition(
681+
test: Expression.Equal(instance, Expression.Constant(null, instanceType)),
682+
ifTrue: Expression.Default(p.PropertyType),
683+
ifFalse: propertyAccess
684+
)
685+
: Expression.Condition(
686+
test: Expression.Equal(instance, Expression.Constant(null, instanceType)),
687+
ifTrue: Expression.Constant(null, p.PropertyType),
688+
ifFalse: propertyAccess
689+
);
684690
}
685691

686692
/// <summary>

0 commit comments

Comments
 (0)