浏览代码

Added INotifyPropertyChanged to SessionInfoDto

ScottIsAFool 11 年之前
父节点
当前提交
aff1f7604a

+ 1 - 1
MediaBrowser.Model.Portable/FodyWeavers.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Weavers>
 <Weavers>
   <PropertyChanged />
   <PropertyChanged />
 </Weavers>
 </Weavers>

+ 0 - 4
MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj

@@ -47,10 +47,6 @@
     <Reference Include="Microsoft.Threading.Tasks.Extensions">
     <Reference Include="Microsoft.Threading.Tasks.Extensions">
       <HintPath>..\packages\Microsoft.Bcl.Async.1.0.16\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
       <HintPath>..\packages\Microsoft.Bcl.Async.1.0.16\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="PropertyChanged">
-      <HintPath>..\packages\PropertyChanged.Fody.1.40.3\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
     <Reference Include="System.Runtime">
     <Reference Include="System.Runtime">
       <HintPath>..\packages\Microsoft.Bcl.1.0.19\lib\portable-net40+sl4+win8+wp71\System.Runtime.dll</HintPath>
       <HintPath>..\packages\Microsoft.Bcl.1.0.19\lib\portable-net40+sl4+win8+wp71\System.Runtime.dll</HintPath>
     </Reference>
     </Reference>

+ 1 - 1
MediaBrowser.Model.Portable/packages.config

@@ -4,5 +4,5 @@
   <package id="Microsoft.Bcl" version="1.0.19" targetFramework="portable-win+net45+sl40+wp71" />
   <package id="Microsoft.Bcl" version="1.0.19" targetFramework="portable-win+net45+sl40+wp71" />
   <package id="Microsoft.Bcl.Async" version="1.0.16" targetFramework="portable-win+net45+sl40+wp71" />
   <package id="Microsoft.Bcl.Async" version="1.0.16" targetFramework="portable-win+net45+sl40+wp71" />
   <package id="Microsoft.Bcl.Build" version="1.0.8" targetFramework="portable-win+net45+sl40+wp71" />
   <package id="Microsoft.Bcl.Build" version="1.0.8" targetFramework="portable-win+net45+sl40+wp71" />
-  <package id="PropertyChanged.Fody" version="1.40.3" targetFramework="portable-net45+sl40+wp71+win" />
+  <package id="PropertyChanged.Fody" version="1.41.0.0" targetFramework="portable-net45+sl40+wp71+win" />
 </packages>
 </packages>

+ 89 - 0
MediaBrowser.Model.net35/Fody.targets

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Choose>
+    <When Condition="$(NCrunchOriginalSolutionDir) != '' And $(NCrunchOriginalSolutionDir) != '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(NCrunchOriginalSolutionDir)</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(SolutionDir) != '' And $(SolutionDir) != '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(SolutionDir)</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(MSBuildProjectDirectory)\..\</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+  </Choose>
+  <Choose>
+    <When Condition="$(KeyOriginatorFile) != '' And $(KeyOriginatorFile) != '*Undefined*'">
+      <PropertyGroup>
+        <FodyKeyFilePath>$(KeyOriginatorFile)</FodyKeyFilePath>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(AssemblyOriginatorKeyFile) != '' And $(AssemblyOriginatorKeyFile) != '*Undefined*'">
+      <PropertyGroup>
+        <FodyKeyFilePath>$(AssemblyOriginatorKeyFile)</FodyKeyFilePath>
+      </PropertyGroup>
+    </When>
+    <Otherwise >
+      <PropertyGroup>
+        <FodyKeyFilePath></FodyKeyFilePath>
+      </PropertyGroup>
+    </Otherwise>
+  </Choose>
+  <PropertyGroup>
+    <IntermediateDir>$(ProjectDir)$(IntermediateOutputPath)</IntermediateDir>
+    <FodyMessageImportance Condition="$(FodyMessageImportance) == '' Or $(FodyMessageImportance) == '*Undefined*'">Low</FodyMessageImportance>
+    <FodySignAssembly Condition="$(FodySignAssembly) == '' Or $(FodySignAssembly) == '*Undefined*'">$(SignAssembly)</FodySignAssembly>
+    <FodyPath Condition="$(FodyPath) == '' Or $(FodyPath) == '*Undefined*'">$(MSBuildThisFileDirectory)</FodyPath>
+  </PropertyGroup>
+  <UsingTask
+      TaskName="Fody.WeavingTask"
+      AssemblyFile="$(FodyPath)\Fody.dll" />
+  <Target
+      AfterTargets="AfterCompile"
+      Name="WinFodyTarget"
+      Condition=" '$(OS)' == 'Windows_NT'">
+
+    <Fody.WeavingTask
+          AssemblyPath="@(IntermediateAssembly)"
+          IntermediateDir="$(IntermediateDir)"
+          KeyFilePath="$(FodyKeyFilePath)"
+          MessageImportance="$(FodyMessageImportance)"
+          ProjectDirectory="$(ProjectDir)"
+          SolutionDir="$(FodySolutionDir)"
+          References="@(ReferencePath)"
+          SignAssembly="$(FodySignAssembly)"
+          ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
+          DefineConstants="$(DefineConstants)"
+      />
+  </Target>
+
+  <Target
+      AfterTargets="AfterBuild"
+      Name="NonWinFodyTarget"
+      Condition=" '$(OS)' != 'Windows_NT'">
+    <Fody.WeavingTask
+          AssemblyPath="$(TargetPath)"
+          IntermediateDir="$(IntermediateDir)"
+          KeyFilePath="$(FodyKeyFilePath)"
+          MessageImportance="$(FodyMessageImportance)"
+          ProjectDirectory="$(ProjectDir)"
+          SolutionDir="$(FodySolutionDir)"
+          References="@(ReferencePath)"
+          SignAssembly="$(FodySignAssembly)"
+          ReferenceCopyLocalPaths="$(ReferenceCopyLocalPaths)"
+          DefineConstants="$(DefineConstants)"
+      />
+  </Target>
+
+
+  <!--Support for ncrunch-->
+  <ItemGroup>
+    <None Include="$(FodyPath)\*.*" />
+  </ItemGroup>
+
+</Project>

+ 4 - 0
MediaBrowser.Model.net35/FodyWeavers.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Weavers>
+  <PropertyChanged />
+</Weavers>

+ 10 - 1
MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj

@@ -12,6 +12,9 @@
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <TargetFrameworkProfile />
     <TargetFrameworkProfile />
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
+    <FodyPath>..\packages\Fody.1.17.0.0</FodyPath>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -367,15 +370,21 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="Fody.targets" />
     <None Include="MediaBrowser.Model.snk" />
     <None Include="MediaBrowser.Model.snk" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="FodyWeavers.xml" />
   </ItemGroup>
   </ItemGroup>
-  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
   <PropertyGroup>
     <PostBuildEvent>if $(ConfigurationName) == Release (
     <PostBuildEvent>if $(ConfigurationName) == Release (
 xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\net35\" /y /d /r /i
 xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\net35\" /y /d /r /i
 )</PostBuildEvent>
 )</PostBuildEvent>
   </PropertyGroup>
   </PropertyGroup>
+  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+  <Import Project="Fody.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">

+ 5 - 0
MediaBrowser.Model.net35/packages.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Fody" version="1.17.0.0" targetFramework="net35" />
+  <package id="PropertyChanged.Fody" version="1.41.0.0" targetFramework="net35" />
+</packages>

+ 89 - 0
MediaBrowser.Model/Fody.targets

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Choose>
+    <When Condition="$(NCrunchOriginalSolutionDir) != '' And $(NCrunchOriginalSolutionDir) != '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(NCrunchOriginalSolutionDir)</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(SolutionDir) != '' And $(SolutionDir) != '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(SolutionDir)</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">
+      <PropertyGroup>
+        <FodySolutionDir>$(MSBuildProjectDirectory)\..\</FodySolutionDir>
+      </PropertyGroup>
+    </When>
+  </Choose>
+  <Choose>
+    <When Condition="$(KeyOriginatorFile) != '' And $(KeyOriginatorFile) != '*Undefined*'">
+      <PropertyGroup>
+        <FodyKeyFilePath>$(KeyOriginatorFile)</FodyKeyFilePath>
+      </PropertyGroup>
+    </When>
+    <When Condition="$(AssemblyOriginatorKeyFile) != '' And $(AssemblyOriginatorKeyFile) != '*Undefined*'">
+      <PropertyGroup>
+        <FodyKeyFilePath>$(AssemblyOriginatorKeyFile)</FodyKeyFilePath>
+      </PropertyGroup>
+    </When>
+    <Otherwise >
+      <PropertyGroup>
+        <FodyKeyFilePath></FodyKeyFilePath>
+      </PropertyGroup>
+    </Otherwise>
+  </Choose>
+  <PropertyGroup>
+    <IntermediateDir>$(ProjectDir)$(IntermediateOutputPath)</IntermediateDir>
+    <FodyMessageImportance Condition="$(FodyMessageImportance) == '' Or $(FodyMessageImportance) == '*Undefined*'">Low</FodyMessageImportance>
+    <FodySignAssembly Condition="$(FodySignAssembly) == '' Or $(FodySignAssembly) == '*Undefined*'">$(SignAssembly)</FodySignAssembly>
+    <FodyPath Condition="$(FodyPath) == '' Or $(FodyPath) == '*Undefined*'">$(MSBuildThisFileDirectory)</FodyPath>
+  </PropertyGroup>
+  <UsingTask
+      TaskName="Fody.WeavingTask"
+      AssemblyFile="$(FodyPath)\Fody.dll" />
+  <Target
+      AfterTargets="AfterCompile"
+      Name="WinFodyTarget"
+      Condition=" '$(OS)' == 'Windows_NT'">
+
+    <Fody.WeavingTask
+          AssemblyPath="@(IntermediateAssembly)"
+          IntermediateDir="$(IntermediateDir)"
+          KeyFilePath="$(FodyKeyFilePath)"
+          MessageImportance="$(FodyMessageImportance)"
+          ProjectDirectory="$(ProjectDir)"
+          SolutionDir="$(FodySolutionDir)"
+          References="@(ReferencePath)"
+          SignAssembly="$(FodySignAssembly)"
+          ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
+          DefineConstants="$(DefineConstants)"
+      />
+  </Target>
+
+  <Target
+      AfterTargets="AfterBuild"
+      Name="NonWinFodyTarget"
+      Condition=" '$(OS)' != 'Windows_NT'">
+    <Fody.WeavingTask
+          AssemblyPath="$(TargetPath)"
+          IntermediateDir="$(IntermediateDir)"
+          KeyFilePath="$(FodyKeyFilePath)"
+          MessageImportance="$(FodyMessageImportance)"
+          ProjectDirectory="$(ProjectDir)"
+          SolutionDir="$(FodySolutionDir)"
+          References="@(ReferencePath)"
+          SignAssembly="$(FodySignAssembly)"
+          ReferenceCopyLocalPaths="$(ReferenceCopyLocalPaths)"
+          DefineConstants="$(DefineConstants)"
+      />
+  </Target>
+
+
+  <!--Support for ncrunch-->
+  <ItemGroup>
+    <None Include="$(FodyPath)\*.*" />
+  </ItemGroup>
+
+</Project>

+ 4 - 7
MediaBrowser.Model/MediaBrowser.Model.csproj

@@ -13,6 +13,7 @@
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
     <RestorePackages>true</RestorePackages>
     <RestorePackages>true</RestorePackages>
+    <FodyPath>..\packages\Fody.1.17.0.0</FodyPath>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -151,20 +152,16 @@
     <Compile Include="Users\AuthenticationResult.cs" />
     <Compile Include="Users\AuthenticationResult.cs" />
     <Compile Include="Weather\WeatherUnits.cs" />
     <Compile Include="Weather\WeatherUnits.cs" />
     <Compile Include="Web\QueryStringDictionary.cs" />
     <Compile Include="Web\QueryStringDictionary.cs" />
+    <None Include="Fody.targets" />
     <None Include="FodyWeavers.xml" />
     <None Include="FodyWeavers.xml" />
+    <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="Microsoft.CSharp" />
-    <Reference Include="PropertyChanged">
-      <HintPath>..\packages\PropertyChanged.Fody.1.32.2.0\lib\portable-net4+sl4+wp7+win8\PropertyChanged.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.Runtime.Serialization" />
   </ItemGroup>
   </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
   <PropertyGroup>
     <PostBuildEvent>if $(ConfigurationName) == Release (
     <PostBuildEvent>if $(ConfigurationName) == Release (
@@ -172,6 +169,7 @@ xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\net45\" /y /d /r /i
 )</PostBuildEvent>
 )</PostBuildEvent>
   </PropertyGroup>
   </PropertyGroup>
   <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
   <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+  <Import Project="Fody.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">
@@ -179,5 +177,4 @@ xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\net45\" /y /d /r /i
   <Target Name="AfterBuild">
   <Target Name="AfterBuild">
   </Target>
   </Target>
   -->
   -->
-  <Import Project="$(ProjectDir)\..\Tools\Fody\Fody.targets" />
 </Project>
 </Project>

+ 1 - 0
MediaBrowser.Model/Session/SessionInfoDto.cs

@@ -3,6 +3,7 @@ using System;
 
 
 namespace MediaBrowser.Model.Session
 namespace MediaBrowser.Model.Session
 {
 {
+    [ImplementPropertyChanged]
     public class SessionInfoDto
     public class SessionInfoDto
     {
     {
         /// <summary>
         /// <summary>

+ 2 - 1
MediaBrowser.Model/packages.config

@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
-  <package id="PropertyChanged.Fody" version="1.32.2.0" targetFramework="portable-win+net45+sl40+wp" />
+  <package id="Fody" version="1.17.0.0" targetFramework="net45" />
+  <package id="PropertyChanged.Fody" version="1.41.0.0" targetFramework="net45" />
 </packages>
 </packages>