Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 8a03b4f

Browse files
Merge branch 'main' into effects/touch
2 parents 34feea6 + f92d82a commit 8a03b4f

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

XamarinCommunityToolkit.UnitTests/Xamarin.CommunityToolkit.UnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net461</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
1111
<PackageReference Include="NSubstitute" Version="4.2.2" />
1212
<PackageReference Include="xunit" Version="2.4.1" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

XamarinCommunityToolkit/Views/AvatarView/AvatarView.shared.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Xamarin.Forms;
22
using static System.Math;
3+
using System.Threading;
4+
using System;
35

46
namespace Xamarin.CommunityToolkit.UI.Views
57
{
@@ -185,7 +187,19 @@ async void OnValuePropertyChanged(bool shouldUpdateSource)
185187
if (Image.Source == Source)
186188
Image.Source = null;
187189

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+
}
189203
Image.Source = Source;
190204
}
191205
Image.Aspect = Aspect;

XamarinCommunityToolkit/Xamarin.CommunityToolkit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
7979
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
8080
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
81+
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
8182
</ItemGroup>
8283
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard2.0')) ">
8384
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
@@ -156,7 +157,6 @@
156157
<Compile Include="**\*.wpf.cs" />
157158
<Compile Include="**\*.wpf.*.cs" />
158159
<PackageReference Include="Xamarin.Forms.Platform.WPF" Version="4.7.0.968" />
159-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
160160
</ItemGroup>
161161

162162
<ItemGroup Condition=" $(TargetFramework.StartsWith('net471')) ">

0 commit comments

Comments
 (0)