Skip to content

Commit b749ef1

Browse files
authored
Revert migration to CommunityToolkit.Mvvm (#382)
1 parent 177bb6f commit b749ef1

18 files changed

+157
-335
lines changed

README-BEFORE-UPDATE-REFS.txt

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ IMPORTANT VERSION CONSTRAINTS:
55
Reason: The VS2019 extension will fail due to a transitive dependency conflict between
66
Compilers.Services.Unsafe and System.Collections.Immutable.
77
- Can't update Polly beyond version 7.2.4 because of dependency conflicts with System.Threading.Tasks.Extensions.
8-
- Can't update CommunityToolkit.Mvvm beyond v7.1.2 because of dependency conflicts with System.Threading.Tasks.Extensions in test framework.

USB Test App WPF/App.xaml.cs

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@
22
// Copyright (c) .NET Foundation and Contributors
33
// See LICENSE file in the project root for full license information.
44
//
5-
//
6-
// Copyright (c) .NET Foundation and Contributors
7-
// See LICENSE file in the project root for full license information.
8-
//
95

10-
using CommonServiceLocator;
11-
using nanoFramework.ANT.Services.NanoFrameworkService;
12-
using nanoFramework.Tools.Debugger;
13-
using Serial_Test_App_WPF.ViewModel;
146
using System;
157
using System.Collections.Generic;
168
using CommunityToolkit.Mvvm.DependencyInjection;
9+
using nanoFramework.ANT.Services.NanoFrameworkService;
10+
using nanoFramework.Tools.Debugger;
11+
using Serial_Test_App_WPF.ViewModel;
1712

1813
namespace Serial_Test_App_WPF
1914
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
3+
<PropertyChanged />
4+
</Weavers>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
4+
<xs:element name="Weavers">
5+
<xs:complexType>
6+
<xs:all>
7+
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
8+
<xs:complexType>
9+
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
10+
<xs:annotation>
11+
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
12+
</xs:annotation>
13+
</xs:attribute>
14+
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
15+
<xs:annotation>
16+
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
17+
</xs:annotation>
18+
</xs:attribute>
19+
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
20+
<xs:annotation>
21+
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
22+
</xs:annotation>
23+
</xs:attribute>
24+
<xs:attribute name="EventInvokerNames" type="xs:string">
25+
<xs:annotation>
26+
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
27+
</xs:annotation>
28+
</xs:attribute>
29+
<xs:attribute name="CheckForEquality" type="xs:boolean">
30+
<xs:annotation>
31+
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
32+
</xs:annotation>
33+
</xs:attribute>
34+
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
35+
<xs:annotation>
36+
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
37+
</xs:annotation>
38+
</xs:attribute>
39+
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
40+
<xs:annotation>
41+
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
42+
</xs:annotation>
43+
</xs:attribute>
44+
<xs:attribute name="SuppressWarnings" type="xs:boolean">
45+
<xs:annotation>
46+
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
47+
</xs:annotation>
48+
</xs:attribute>
49+
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
50+
<xs:annotation>
51+
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
52+
</xs:annotation>
53+
</xs:attribute>
54+
</xs:complexType>
55+
</xs:element>
56+
</xs:all>
57+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
58+
<xs:annotation>
59+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
60+
</xs:annotation>
61+
</xs:attribute>
62+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
63+
<xs:annotation>
64+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
65+
</xs:annotation>
66+
</xs:attribute>
67+
<xs:attribute name="GenerateXsd" type="xs:boolean">
68+
<xs:annotation>
69+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
70+
</xs:annotation>
71+
</xs:attribute>
72+
</xs:complexType>
73+
</xs:element>
74+
</xs:schema>

nanoFramework.Tools.DebugLibrary.Net/nanoFramework.Tools.DebugLibrary.Net.csproj

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>library</OutputType>
44
<TargetFrameworks>net6.0;net472</TargetFrameworks>
@@ -61,7 +61,11 @@
6161
<None Include="key.snk" />
6262
</ItemGroup>
6363
<ItemGroup>
64-
<PackageReference Include="CommunityToolkit.Mvvm" Version="7.1.2" />
64+
<PackageReference Include="Fody">
65+
<Version>6.9.1</Version>
66+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
67+
<PrivateAssets>all</PrivateAssets>
68+
</PackageReference>
6569
<PackageReference Include="Microsoft.SourceLink.GitHub">
6670
<Version>8.0.0</Version>
6771
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -78,9 +82,15 @@
7882
<PrivateAssets>all</PrivateAssets>
7983
</PackageReference>
8084
<PackageReference Include="Polly" Version="7.2.4" />
85+
<PackageReference Include="PropertyChanged.Fody">
86+
<Version>4.1.0</Version>
87+
</PackageReference>
8188
<PackageReference Include="System.IO.Ports">
8289
<Version>8.0.0</Version>
8390
</PackageReference>
8491
</ItemGroup>
92+
<ItemGroup>
93+
<Content Include="FodyWeavers.xml" />
94+
</ItemGroup>
8595
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
86-
</Project>
96+
</Project>

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.NetworkConfigurationProperties.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
//
7-
// Copyright (c) .NET Foundation and Contributors
8-
// See LICENSE file in the project root for full license information.
9-
//
10-
11-
using CommunityToolkit.Mvvm.ComponentModel;
126
using System.Net;
137
using System.Text;
148

@@ -22,13 +16,7 @@ public class NetworkConfigurationProperties : NetworkConfigurationPropertiesBase
2216
{
2317
internal const uint EmptySpecificConfigValue = uint.MaxValue;
2418

25-
private bool _isUnknown = true;
26-
27-
public bool IsUnknown
28-
{
29-
get => _isUnknown;
30-
set => SetProperty(ref _isUnknown, value);
31-
}
19+
public bool IsUnknown { get; set; }
3220

3321
public NetworkConfigurationProperties() : base()
3422
{

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.Wireless80211ConfigurationProperties.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
//
7-
// Copyright (c) .NET Foundation and Contributors
8-
// See LICENSE file in the project root for full license information.
9-
//
10-
11-
using CommunityToolkit.Mvvm.ComponentModel;
126
using System;
137
using System.Text;
148

@@ -18,13 +12,7 @@ public partial class DeviceConfiguration
1812
{
1913
public class Wireless80211ConfigurationProperties : Wireless80211ConfigurationPropertiesBase
2014
{
21-
private bool _isUnknown = true;
22-
23-
public bool IsUnknown
24-
{
25-
get => _isUnknown;
26-
set => SetProperty(ref _isUnknown, value);
27-
}
15+
public bool IsUnknown { get; set; }
2816

2917
public Wireless80211ConfigurationProperties()
3018
{

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.WirelessAPConfigurationProperties.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
//
7-
// Copyright (c) .NET Foundation and Contributors
8-
// See LICENSE file in the project root for full license information.
9-
//
10-
11-
using CommunityToolkit.Mvvm.ComponentModel;
126
using System;
137
using System.Text;
148

@@ -18,13 +12,7 @@ public partial class DeviceConfiguration
1812
{
1913
public class WirelessAPConfigurationProperties : WirelessAPConfigurationPropertiesBase
2014
{
21-
private bool _isUnknown = true;
22-
23-
public bool IsUnknown
24-
{
25-
get => _isUnknown;
26-
set => SetProperty(ref _isUnknown, value);
27-
}
15+
public bool IsUnknown { get; set; }
2816

2917
public WirelessAPConfigurationProperties()
3018
{

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.X509CaRootBundleProperties.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
//
7-
// Copyright (c) .NET Foundation and Contributors
8-
// See LICENSE file in the project root for full license information.
9-
//
10-
11-
using CommunityToolkit.Mvvm.ComponentModel;
126
using System.Text;
137

148
namespace nanoFramework.Tools.Debugger
@@ -17,13 +11,7 @@ public partial class DeviceConfiguration
1711
{
1812
public class X509CaRootBundleProperties : X509CaRootBundlePropertiesBase
1913
{
20-
private bool _isUnknown = true;
21-
22-
public bool IsUnknown
23-
{
24-
get => _isUnknown;
25-
set => SetProperty(ref _isUnknown, value);
26-
}
14+
public bool IsUnknown { get; set; }
2715

2816
public X509CaRootBundleProperties()
2917
{

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.X509DeviceCertificatesProperties.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
//
7-
// Copyright (c) .NET Foundation and Contributors
8-
// See LICENSE file in the project root for full license information.
9-
//
10-
11-
using CommunityToolkit.Mvvm.ComponentModel;
126
using System.Text;
137

148
namespace nanoFramework.Tools.Debugger
@@ -17,13 +11,7 @@ public partial class DeviceConfiguration
1711
{
1812
public class X509DeviceCertificatesProperties : X509DeviceCertificatesPropertiesBase
1913
{
20-
private bool _isUnknown = true;
21-
22-
public bool IsUnknown
23-
{
24-
get => _isUnknown;
25-
set => SetProperty(ref _isUnknown, value);
26-
}
14+
public bool IsUnknown { get; set; }
2715

2816
public X509DeviceCertificatesProperties()
2917
{

nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/DeviceConfiguration.cs

+2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
using System.Collections.Generic;
88
using System.Linq;
99
using System.Net;
10+
using PropertyChanged;
1011

1112
namespace nanoFramework.Tools.Debugger
1213
{
14+
[AddINotifyPropertyChangedInterface]
1315
public partial class DeviceConfiguration
1416
{
1517
/////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)