Skip to content

Commit

Permalink
Revert migration to CommunityToolkit.Mvvm (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Nov 27, 2024
1 parent 177bb6f commit b749ef1
Show file tree
Hide file tree
Showing 18 changed files with 157 additions and 335 deletions.
1 change: 0 additions & 1 deletion README-BEFORE-UPDATE-REFS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ IMPORTANT VERSION CONSTRAINTS:
Reason: The VS2019 extension will fail due to a transitive dependency conflict between
Compilers.Services.Unsafe and System.Collections.Immutable.
- Can't update Polly beyond version 7.2.4 because of dependency conflicts with System.Threading.Tasks.Extensions.
- Can't update CommunityToolkit.Mvvm beyond v7.1.2 because of dependency conflicts with System.Threading.Tasks.Extensions in test framework.
11 changes: 3 additions & 8 deletions USB Test App WPF/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommonServiceLocator;
using nanoFramework.ANT.Services.NanoFrameworkService;
using nanoFramework.Tools.Debugger;
using Serial_Test_App_WPF.ViewModel;
using System;
using System.Collections.Generic;
using CommunityToolkit.Mvvm.DependencyInjection;
using nanoFramework.ANT.Services.NanoFrameworkService;
using nanoFramework.Tools.Debugger;
using Serial_Test_App_WPF.ViewModel;

namespace Serial_Test_App_WPF
{
Expand Down
4 changes: 4 additions & 0 deletions nanoFramework.Tools.DebugLibrary.Net/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
74 changes: 74 additions & 0 deletions nanoFramework.Tools.DebugLibrary.Net/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<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>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressWarnings" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>library</OutputType>
<TargetFrameworks>net6.0;net472</TargetFrameworks>
Expand Down Expand Up @@ -61,7 +61,11 @@
<None Include="key.snk" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="7.1.2" />
<PackageReference Include="Fody">
<Version>6.9.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<Version>8.0.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -78,9 +82,15 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="PropertyChanged.Fody">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="System.IO.Ports">
<Version>8.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// See LICENSE file in the project root for full license information.
//

//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommunityToolkit.Mvvm.ComponentModel;
using System.Net;
using System.Text;

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

private bool _isUnknown = true;

public bool IsUnknown
{
get => _isUnknown;
set => SetProperty(ref _isUnknown, value);
}
public bool IsUnknown { get; set; }

public NetworkConfigurationProperties() : base()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// See LICENSE file in the project root for full license information.
//

//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Text;

Expand All @@ -18,13 +12,7 @@ public partial class DeviceConfiguration
{
public class Wireless80211ConfigurationProperties : Wireless80211ConfigurationPropertiesBase
{
private bool _isUnknown = true;

public bool IsUnknown
{
get => _isUnknown;
set => SetProperty(ref _isUnknown, value);
}
public bool IsUnknown { get; set; }

public Wireless80211ConfigurationProperties()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// See LICENSE file in the project root for full license information.
//

//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Text;

Expand All @@ -18,13 +12,7 @@ public partial class DeviceConfiguration
{
public class WirelessAPConfigurationProperties : WirelessAPConfigurationPropertiesBase
{
private bool _isUnknown = true;

public bool IsUnknown
{
get => _isUnknown;
set => SetProperty(ref _isUnknown, value);
}
public bool IsUnknown { get; set; }

public WirelessAPConfigurationProperties()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// See LICENSE file in the project root for full license information.
//

//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommunityToolkit.Mvvm.ComponentModel;
using System.Text;

namespace nanoFramework.Tools.Debugger
Expand All @@ -17,13 +11,7 @@ public partial class DeviceConfiguration
{
public class X509CaRootBundleProperties : X509CaRootBundlePropertiesBase
{
private bool _isUnknown = true;

public bool IsUnknown
{
get => _isUnknown;
set => SetProperty(ref _isUnknown, value);
}
public bool IsUnknown { get; set; }

public X509CaRootBundleProperties()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
// See LICENSE file in the project root for full license information.
//

//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using CommunityToolkit.Mvvm.ComponentModel;
using System.Text;

namespace nanoFramework.Tools.Debugger
Expand All @@ -17,13 +11,7 @@ public partial class DeviceConfiguration
{
public class X509DeviceCertificatesProperties : X509DeviceCertificatesPropertiesBase
{
private bool _isUnknown = true;

public bool IsUnknown
{
get => _isUnknown;
set => SetProperty(ref _isUnknown, value);
}
public bool IsUnknown { get; set; }

public X509DeviceCertificatesProperties()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Net;
using PropertyChanged;

namespace nanoFramework.Tools.Debugger
{
[AddINotifyPropertyChangedInterface]
public partial class DeviceConfiguration
{
/////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit b749ef1

Please sign in to comment.