This repository was archived by the owner on May 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >netcoreapp3.1;net461</TargetFrameworks >
4
+ <TargetFrameworks >netcoreapp2.1; netcoreapp3.1;net461</TargetFrameworks >
5
5
6
6
<IsPackable >false</IsPackable >
7
7
</PropertyGroup >
8
8
9
9
<ItemGroup >
10
- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.7 .0" />
10
+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.8 .0" />
11
11
<PackageReference Include =" NSubstitute" Version =" 4.2.2" />
12
12
<PackageReference Include =" xunit" Version =" 2.4.1" />
13
13
<PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.3" >
Original file line number Diff line number Diff line change 1
1
using Xamarin . Forms ;
2
2
using static System . Math ;
3
+ using System . Threading ;
4
+ using System ;
3
5
4
6
namespace Xamarin . CommunityToolkit . UI . Views
5
7
{
@@ -185,7 +187,19 @@ async void OnValuePropertyChanged(bool shouldUpdateSource)
185
187
if ( Image . Source == Source )
186
188
Image . Source = null ;
187
189
188
- Image . IsVisible = await imageSourceValidator . IsImageSourceValidAsync ( Source ) ;
190
+ try
191
+ {
192
+ Image . IsVisible = await imageSourceValidator . IsImageSourceValidAsync ( Source ) ;
193
+ }
194
+ catch ( OperationCanceledException )
195
+ {
196
+ Xamarin . Forms . Internals . Log . Warning ( "CancellationException" , "IsImageSourceValidAsync was cancelled." ) ;
197
+ }
198
+ catch ( System . Exception ex )
199
+ {
200
+ Xamarin . Forms . Internals . Log . Warning ( "Error" , ex . Message ) ;
201
+ throw ;
202
+ }
189
203
Image . Source = Source ;
190
204
}
191
205
Image . Aspect = Aspect ;
Original file line number Diff line number Diff line change 78
78
<PackageReference Include =" System.Reflection.Emit.Lightweight" Version =" 4.7.0" />
79
79
<PackageReference Include =" System.ComponentModel" Version =" 4.3.0" />
80
80
<PackageReference Include =" System.ValueTuple" Version =" 4.5.0" />
81
+ <PackageReference Update =" NETStandard.Library" PrivateAssets =" all" />
81
82
</ItemGroup >
82
83
<ItemGroup Condition =" $(TargetFramework.StartsWith('netstandard2.0')) " >
83
84
<PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.4" />
156
157
<Compile Include =" **\*.wpf.cs" />
157
158
<Compile Include =" **\*.wpf.*.cs" />
158
159
<PackageReference Include =" Xamarin.Forms.Platform.WPF" Version =" 4.7.0.968" />
159
- <PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.4" />
160
160
</ItemGroup >
161
161
162
162
<ItemGroup Condition =" $(TargetFramework.StartsWith('net471')) " >
You can’t perform that action at this time.
0 commit comments