Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
Merge pull request #10 from bramborman/dev
  • Loading branch information
bramborman authored Apr 22, 2017
2 parents 10dea07 + 0a0de1f commit cddc9f5
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 105 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
_scale-*.appx
_language-*.appx
Expand Down
24 changes: 8 additions & 16 deletions AfterBuild.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
$buildVersion = $env:APPVEYOR_BUILD_VERSION

if (($env:APPVEYOR_REPO_BRANCH -eq "master") -and ($env:APPVEYOR_PULL_REQUEST_TITLE -eq $null) -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null))
{
$newVersion = $buildVersion.Split("-") | Select-Object -first 1
$message = "Build version changed from '$buildVersion' to '$newVersion'"

$buildVersion = $newVersion
Update-AppveyorBuild -Version $buildVersion

Add-AppveyorMessage $message
Write-Host $message
}
Start-FileDownload "https://raw.githubusercontent.com/bramborman/AppVeyorBuildScripts/master/Scripts/Set-PureBuildVersion.ps1"
.\Set-PureBuildVersion.ps1

$projectFolders = Get-ChildItem -Directory -Filter "NotifyPropertyChangedBase*"

Expand All @@ -23,11 +12,14 @@ foreach ($projectFolder in $projectFolders)
continue;
}

$zipFileName = "$projectFolder.$buildVersion.zip"
$zipFileName = "$projectFolder.$env:APPVEYOR_BUILD_VERSION.zip"
7z a $zipFileName "$releaseFolder\*"

Push-AppveyorArtifact $zipFileName
}

NuGet pack -Version $buildVersion
Push-AppveyorArtifact *.nupkg
Start-FileDownload "https://raw.githubusercontent.com/bramborman/AppVeyorBuildScripts/master/Scripts/NuGet-Pack.ps1"
.\NuGet-Pack.ps1

Start-FileDownload "https://raw.githubusercontent.com/bramborman/AppVeyorBuildScripts/master/Scripts/Deployment-Skipping.ps1"
.\Deployment-Skipping.ps1
20 changes: 10 additions & 10 deletions NotifyPropertyChangedBase.Uap/NotifyPropertyChangedBase.Uap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}</ProjectGuid>
<ProjectGuid>{25F76EE1-678A-4247-9697-5E5DAD3BB76E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NotifyPropertyChangedBase</RootNamespace>
<AssemblyName>NotifyPropertyChangedBase.Uap</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -110,20 +110,20 @@
<ErrorReport>prompt</ErrorReport>
<DocumentationFile>bin\x64\Release\NotifyPropertyChangedBase.Uap.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\NotifyPropertyChangedBase.Uap.rd.xml" />
<!-- Nuspec file must be references explicitly for the NuSpec.ReferenceGenerator since it has different name than the current project -->
<NuSpecFile Include="$(SolutionDir)\NotifyPropertyChangedBase.nuspec">
<Visible>False</Visible>
</NuSpecFile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.3.2</Version>
</PackageReference>
</ItemGroup>
<Import Project="..\NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
17 changes: 0 additions & 17 deletions NotifyPropertyChangedBase.Uap/project.json

This file was deleted.

23 changes: 8 additions & 15 deletions NotifyPropertyChangedBase.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,21 @@
<licenseUrl>https://github.com/bramborman/NotifyPropertyChangedBase/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/bramborman/NotifyPropertyChangedBase</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Provides an easy to use base class NotifyPropertyChanged that helps you implement the INotifyPropertyChanged interface.</description>
<description>NotifyPropertyChangedBase provides you an easy to use base class NotifyPropertyChanged that helps you implement the INotifyPropertyChanged interface which can help you in many cases, whether are you developing WPF, Console, UWP or any other app.</description>
<summary>Provides an easy to use base class NotifyPropertyChanged that helps you implement the INotifyPropertyChanged interface.</summary>
<copyright>© 2017 Marian Dolinský</copyright>
<tags>C# Helper Helpers Binding Bindings MVVM</tags>
<dependencies>
<group targetFramework=".NETFramework4.5" />
<group targetFramework=".NETFramework4.0" />
<group targetFramework=".NETFramework4.5"/>
<group targetFramework=".NETFramework4.0"/>
<group targetFramework="uap10.0">
<dependency id="System.Runtime.Extensions" version="4.1.0" />
<dependency id="System.Collections" version="4.0.11" />
<dependency id="System.Diagnostics.Debug" version="4.0.11" />
<dependency id="System.Linq" version="4.1.0" />
<dependency id="System.ObjectModel" version="4.0.12" />
<dependency id="System.Reflection" version="4.1.0" />
<dependency id="System.Reflection.TypeExtensions" version="4.1.0" />
<dependency id="System.Runtime" version="4.1.0" />
<dependency id="System.Threading" version="4.0.11" />
<dependency id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.3.2"/>
</group>
</dependencies>
</metadata>
<files>
<file src="NotifyPropertyChangedBase.Net40\bin\Release\**\*" target="lib\net40" />
<file src="NotifyPropertyChangedBase.Net45\bin\Release\**\*" target="lib\net45" />
<file src="NotifyPropertyChangedBase.Uap\bin\Release\**\*" target="lib\uap10.0" />
<file src="NotifyPropertyChangedBase.Net40\bin\Release\**\*" target="lib\net40"/>
<file src="NotifyPropertyChangedBase.Net45\bin\Release\**\*" target="lib\net45"/>
<file src="NotifyPropertyChangedBase.Uap\bin\Release\**\*" target="lib\uap10.0"/>
</files>
</package>
38 changes: 19 additions & 19 deletions NotifyPropertyChangedBase.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.10
VisualStudioVersion = 15.0.26403.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "NotifyPropertyChangedBase", "NotifyPropertyChangedBase\NotifyPropertyChangedBase.shproj", "{036F1706-A135-46EA-A881-C2B334E9936D}"
EndProject
Expand All @@ -21,13 +21,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifyPropertyChangedBase.N
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifyPropertyChangedBase.Net45", "NotifyPropertyChangedBase.Net45\NotifyPropertyChangedBase.Net45.csproj", "{AC23EF0B-D5BD-401E-A074-4072DCA935AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifyPropertyChangedBase.Uap", "NotifyPropertyChangedBase.Uap\NotifyPropertyChangedBase.Uap.csproj", "{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifyPropertyChangedBase.Uap", "NotifyPropertyChangedBase.Uap\NotifyPropertyChangedBase.Uap.csproj", "{25F76EE1-678A-4247-9697-5E5DAD3BB76E}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems*{036f1706-a135-46ea-a881-c2b334e9936d}*SharedItemsImports = 13
NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems*{25f76ee1-678a-4247-9697-5e5dad3bb76e}*SharedItemsImports = 4
NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems*{53cf9f37-5693-46ea-b722-0e083ae61582}*SharedItemsImports = 4
NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems*{a08ceae6-7fe6-4b0d-9a3b-c0687bef4d35}*SharedItemsImports = 4
NotifyPropertyChangedBase\NotifyPropertyChangedBase.projitems*{ac23ef0b-d5bd-401e-a074-4072dca935ac}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -73,22 +73,22 @@ Global
{AC23EF0B-D5BD-401E-A074-4072DCA935AC}.Release|x64.Build.0 = Release|Any CPU
{AC23EF0B-D5BD-401E-A074-4072DCA935AC}.Release|x86.ActiveCfg = Release|Any CPU
{AC23EF0B-D5BD-401E-A074-4072DCA935AC}.Release|x86.Build.0 = Release|Any CPU
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|ARM.ActiveCfg = Debug|ARM
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|ARM.Build.0 = Debug|ARM
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|x64.ActiveCfg = Debug|x64
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|x64.Build.0 = Debug|x64
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|x86.ActiveCfg = Debug|x86
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Debug|x86.Build.0 = Debug|x86
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|Any CPU.Build.0 = Release|Any CPU
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|ARM.ActiveCfg = Release|ARM
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|ARM.Build.0 = Release|ARM
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|x64.ActiveCfg = Release|x64
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|x64.Build.0 = Release|x64
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|x86.ActiveCfg = Release|x86
{A08CEAE6-7FE6-4B0D-9A3B-C0687BEF4D35}.Release|x86.Build.0 = Release|x86
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|ARM.ActiveCfg = Debug|ARM
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|ARM.Build.0 = Debug|ARM
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|x64.ActiveCfg = Debug|x64
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|x64.Build.0 = Debug|x64
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|x86.ActiveCfg = Debug|x86
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Debug|x86.Build.0 = Debug|x86
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|Any CPU.Build.0 = Release|Any CPU
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|ARM.ActiveCfg = Release|ARM
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|ARM.Build.0 = Release|ARM
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|x64.ActiveCfg = Release|x64
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|x64.Build.0 = Release|x64
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|x86.ActiveCfg = Release|x86
{25F76EE1-678A-4247-9697-5E5DAD3BB76E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
14 changes: 0 additions & 14 deletions NotifyPropertyChangedBase/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,5 @@ internal static bool GetIsValueType(this Type type)
return type.IsValueType;
#endif
}

internal static bool GetIsSubclassOf(this Type type, Type baseClass)
{
#if WINDOWS_UWP
return type.GetTypeInfo().IsSubclassOf(baseClass);
#else
return type.IsSubclassOf(baseClass);
#endif
}

internal static bool GetIsNullableOfT(this Type type)
{
return type.Name == "Nullable`1";
}
}
}
9 changes: 3 additions & 6 deletions NotifyPropertyChangedBase/NotifyPropertyChanged.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
#if WINDOWS_UWP
using System.Reflection;
#endif
Expand Down Expand Up @@ -266,18 +265,16 @@ private void ValidateValueForType(object value, Type type)
{
if (value == null)
{
if (type.GetIsValueType() && !type.GetIsNullableOfT())
if (type.GetIsValueType() && Nullable.GetUnderlyingType(type) == null)
{
throw new ArgumentException($"The type '{type}' is not a nullable type.");
}
}
else
{
Type valueType = value.GetType();

if (valueType != type && !valueType.GetIsSubclassOf(type) && !(type.GetIsNullableOfT() && type.GetGenericArguments().Contains(valueType)))
if (!type.IsAssignableFrom(value.GetType()))
{
throw new ArgumentException($"Value of type {valueType} cannot be assigned to a property of type ({type})");
throw new ArgumentException($"The specified value cannot be assigned to a property of type ({type})");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![NuGet](https://img.shields.io/nuget/v/NotifyPropertyChangedBase.svg)](https://www.nuget.org/packages/NotifyPropertyChangedBase/)
[![Build status](https://ci.appveyor.com/api/projects/status/jc9gcr4gldjr8nq6/branch/master?svg=true)](https://ci.appveyor.com/project/bramborman/notifypropertychangedbase/branch/master)
[![Issues](https://img.shields.io/github/issues/bramborman/NotifyPropertyChangedBase.svg)](https://github.com/bramborman/NotifyPropertyChangedBase/issues)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bramborman/NotifyPropertyChangedBase/blob/master/LICENSE.md)

NotifyPropertyChangedBase provides you an easy to use base class `NotifyPropertyChanged` that helps you implement the `INotifyPropertyChanged` interface which can help you in many cases, whether are you developing WPF, Console, UWP or any other app.

Expand Down
2 changes: 1 addition & 1 deletion SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[assembly: AssemblyDescription("An easy to use base class that helps you implement the INotifyPropertyChanged interface.")]
[assembly: AssemblyCompany("Marian Dolinský")]
[assembly: AssemblyCopyright("© 2017 Marian Dolinský")]
[assembly: ComVisible(false)]
// Managed in appveyor.yml
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: ComVisible(false)]
17 changes: 12 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.2.0-{branch}{build}
version: 1.2.1-{branch}{build}
pull_requests:
do_not_increment_build_number: true
branches:
Expand All @@ -17,23 +17,30 @@ configuration: Release
assembly_info:
patch: true
file: SharedAssemblyInfo.cs
assembly_version: 1.2.0.{build}
assembly_file_version: 1.2.0.{build}
assembly_informational_version: 1.2.0.{build}
assembly_version: 1.2.1.{build}
assembly_file_version: 1.2.1.{build}
assembly_informational_version: 1.2.1.{build}
before_build:
- cmd: nuget restore
- ps: >-
Start-FileDownload "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe"
.\nuget restore
build:
verbosity: minimal
after_build:
- ps: '& .\AfterBuild.ps1'
deploy:
- provider: Environment
name: MyGet
on:
SKIP_DEPLOYMENT: false
- provider: Environment
name: NuGet
on:
branch: master
SKIP_DEPLOYMENT: false
- provider: Environment
name: GitHub Releases
on:
branch: master
SKIP_DEPLOYMENT: false

0 comments on commit cddc9f5

Please sign in to comment.