Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PropertyChangedInterface to device configuration classes #165

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/USB Test App WPF/Serial Test App WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets'))" />
<Error Condition="!Exists('..\packages\Fody.3.1.4\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.1.4\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.3.2.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.2.0\build\Fody.targets'))" />
</Target>
<Import Project="..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets" Condition="Exists('..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets')" />
<Import Project="..\packages\Fody.3.1.4\build\Fody.targets" Condition="Exists('..\packages\Fody.3.1.4\build\Fody.targets')" />
<Import Project="..\packages\Fody.3.2.0\build\Fody.targets" Condition="Exists('..\packages\Fody.3.2.0\build\Fody.targets')" />
</Project>
2 changes: 1 addition & 1 deletion source/USB Test App WPF/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.4" targetFramework="net46" />
<package id="Fody" version="3.1.4" targetFramework="net46" developmentDependency="true" />
<package id="Fody" version="3.2.0" targetFramework="net46" developmentDependency="true" />
<package id="MvvmLight" version="5.4.1" targetFramework="net46" />
<package id="MvvmLightLibs" version="5.4.1" targetFramework="net46" />
<package id="nanoFramework.CoreLibrary" version="1.0.0-preview042" targetFramework="net46" />
Expand Down
4 changes: 4 additions & 0 deletions source/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>
<PropertyChanged/>
</Weavers>
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ For UWP look for the respective Nuget package.</PackageReleaseNotes>
<ItemGroup>
<Reference Include="PresentationFramework" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="PropertyChanged, Version=2.5.9.0, Culture=neutral, PublicKeyToken=ee3ee20bcf148ddd, processorArchitecture=MSIL">
<HintPath>..\packages\PropertyChanged.Fody.2.5.9\lib\net452\PropertyChanged.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Runtime" />
Expand Down Expand Up @@ -93,7 +96,9 @@ For UWP look for the respective Nuget package.</PackageReleaseNotes>
<ItemGroup>
<Analyzer Include="..\packages\UwpDesktop.10.0.14393.3\analyzers\dotnet\UwpDesktopAnalyzer.dll" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand All @@ -103,7 +108,9 @@ For UWP look for the respective Nuget package.</PackageReleaseNotes>
<Error Condition="!Exists('..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets'))" />
<Error Condition="!Exists('..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.props'))" />
<Error Condition="!Exists('..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.targets'))" />
<Error Condition="!Exists('..\packages\Fody.3.2.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.2.0\build\Fody.targets'))" />
</Target>
<Import Project="..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets" Condition="Exists('..\packages\UwpDesktop.10.0.14393.3\build\portable-net45+uap\UwpDesktop.targets')" />
<Import Project="..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.targets" Condition="Exists('..\packages\NuGet.Build.Packaging.0.2.2\build\NuGet.Build.Packaging.targets')" />
<Import Project="..\packages\Fody.3.2.0\build\Fody.targets" Condition="Exists('..\packages\Fody.3.2.0\build\Fody.targets')" />
</Project>
2 changes: 2 additions & 0 deletions source/nanoFramework.Tools.DebugLibrary.Net/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Fody" version="3.2.0" targetFramework="net46" developmentDependency="true" />
<package id="NuGet.Build.Packaging" version="0.2.2" targetFramework="net46" developmentDependency="true" />
<package id="PropertyChanged.Fody" version="2.5.9" targetFramework="net46" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.1" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net46" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net46" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See LICENSE file in the project root for full license information.
//

using PropertyChanged;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
Expand Down Expand Up @@ -121,13 +122,14 @@ static internal uint[] FromIPv6Address(IPAddress address)

/////////////////////////////////////////////////////////////

[AddINotifyPropertyChangedInterface]
public class NetworkConfigurationProperties : NetworkConfigurationPropertiesBase
{
internal const uint EmptySpecificConfigValue = uint.MaxValue;

public bool IsUnknown { get; set; } = true;

public NetworkConfigurationProperties()
public NetworkConfigurationProperties() : base()
{

}
Expand Down Expand Up @@ -197,6 +199,7 @@ public static explicit operator NetworkConfigurationBase(NetworkConfigurationPro

}

[AddINotifyPropertyChangedInterface]
public class Wireless80211ConfigurationProperties : Wireless80211ConfigurationPropertiesBase
{
public bool IsUnknown { get; set; } = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
// See LICENSE file in the project root for full license information.
//

using PropertyChanged;
using System;
using System.Net;

namespace nanoFramework.Tools.Debugger
{
[AddINotifyPropertyChangedInterface]
public class NetworkConfigurationPropertiesBase
{
public IPAddress IPv4Address { get; set; }
Expand All @@ -25,5 +27,11 @@ public class NetworkConfigurationPropertiesBase
public Nullable<uint> SpecificConfigId;
public bool AutomaticDNS;
public AddressMode StartupAddressMode { get; set; }

public NetworkConfigurationPropertiesBase()
{
MacAddress = new byte[] { 0, 0, 0, 0, 0, 0 };
InterfaceType = NetworkInterfaceType.Ethernet;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
// See LICENSE file in the project root for full license information.
//

using PropertyChanged;
using System.ComponentModel.DataAnnotations;

namespace nanoFramework.Tools.Debugger
{
[AddINotifyPropertyChangedInterface]
public class Wireless80211ConfigurationPropertiesBase
{
public uint Id { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions source/nanoFramework.Tools.DebugLibrary.UWP/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<PropertyChanged/>
</Weavers>
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ For .NET look for the respective Nuget package.</PackageReleaseNotes>
<PackageReference Include="NuGet.Build.Packaging">
<Version>0.2.2</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.5.9</Version>
</PackageReference>
<PackageReference Include="System.Threading.Tasks.Extensions">
<Version>4.5.1</Version>
</PackageReference>
Expand All @@ -156,6 +159,9 @@ For .NET look for the respective Nuget package.</PackageReleaseNotes>
<ItemGroup>
<None Include="key.snk" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down