From 7669d8880ecdde7d41261fb252a38341b0a197e0 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Thu, 3 Apr 2014 11:45:00 +0200 Subject: [PATCH] first running version of new package --- .../PocketSharp.Silverlight/App.xaml | 8 - .../PocketSharp.Silverlight/App.xaml.cs | 68 ------- .../PocketSharp.Silverlight/MainPage.xaml | 16 -- .../PocketSharp.Silverlight/MainPage.xaml.cs | 60 ------ .../PocketSharp.Silverlight.csproj | 172 ------------------ .../Properties/AppManifest.xml | 6 - .../Properties/AssemblyInfo.cs | 35 ---- .../PocketSharp.Silverlight/packages.config | 7 - .../PocketSharp.WP8/PocketSharp.WP8.csproj | 1 + .../app.config | 4 +- PocketSharp.Tests/PocketSharp.Tests.csproj | 25 +-- PocketSharp.Tests/app.config | 2 +- PocketSharp.Tests/packages.config | 10 +- PocketSharp.WP7/App.xaml | 19 -- PocketSharp.WP7/App.xaml.cs | 151 --------------- PocketSharp.WP7/ApplicationIcon.png | Bin 1881 -> 0 bytes PocketSharp.WP7/Background.png | Bin 3521 -> 0 bytes PocketSharp.WP7/MainPage.xaml | 45 ----- PocketSharp.WP7/MainPage.xaml.cs | 22 --- PocketSharp.WP7/PocketSharp.WP7.csproj | 155 ---------------- PocketSharp.WP7/Properties/AppManifest.xml | 6 - PocketSharp.WP7/Properties/AssemblyInfo.cs | 37 ---- PocketSharp.WP7/Properties/WMAppManifest.xml | 35 ---- PocketSharp.WP7/SplashScreenImage.jpg | Bin 9417 -> 0 bytes PocketSharp.WP7/ViewModels/ItemViewModel.cs | 102 ----------- PocketSharp.WP7/ViewModels/MainViewModel.cs | 106 ----------- PocketSharp.WP7/packages.config | 7 - PocketSharp.sln | 48 ++--- PocketSharp/Components/Modify.cs | 14 ++ PocketSharp/Fody.targets | 86 --------- PocketSharp/FodyWeavers.xml | 2 +- PocketSharp/Models/Parameters/Parameters.cs | 24 ++- PocketSharp/PocketSharp.csproj | 76 +++++--- PocketSharp/app.config | 15 ++ PocketSharp/packages.config | 13 +- 35 files changed, 136 insertions(+), 1241 deletions(-) delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/App.xaml delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/App.xaml.cs delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/MainPage.xaml delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/MainPage.xaml.cs delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/PocketSharp.Silverlight.csproj delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/Properties/AppManifest.xml delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/Properties/AssemblyInfo.cs delete mode 100644 PocketSharp.Examples/PocketSharp.Silverlight/packages.config rename PocketSharp.Examples/{PocketSharp.Silverlight => PocketSharp.WP8}/app.config (76%) delete mode 100644 PocketSharp.WP7/App.xaml delete mode 100644 PocketSharp.WP7/App.xaml.cs delete mode 100644 PocketSharp.WP7/ApplicationIcon.png delete mode 100644 PocketSharp.WP7/Background.png delete mode 100644 PocketSharp.WP7/MainPage.xaml delete mode 100644 PocketSharp.WP7/MainPage.xaml.cs delete mode 100644 PocketSharp.WP7/PocketSharp.WP7.csproj delete mode 100644 PocketSharp.WP7/Properties/AppManifest.xml delete mode 100644 PocketSharp.WP7/Properties/AssemblyInfo.cs delete mode 100644 PocketSharp.WP7/Properties/WMAppManifest.xml delete mode 100644 PocketSharp.WP7/SplashScreenImage.jpg delete mode 100644 PocketSharp.WP7/ViewModels/ItemViewModel.cs delete mode 100644 PocketSharp.WP7/ViewModels/MainViewModel.cs delete mode 100644 PocketSharp.WP7/packages.config delete mode 100644 PocketSharp/Fody.targets create mode 100644 PocketSharp/app.config diff --git a/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml b/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml deleted file mode 100644 index 3d26bdd..0000000 --- a/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml.cs b/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml.cs deleted file mode 100644 index 16f84b6..0000000 --- a/PocketSharp.Examples/PocketSharp.Silverlight/App.xaml.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; - -namespace PocketSharp.Silverlight -{ - public partial class App : Application - { - - public App() - { - this.Startup += this.Application_Startup; - this.Exit += this.Application_Exit; - this.UnhandledException += this.Application_UnhandledException; - - InitializeComponent(); - } - - private void Application_Startup(object sender, StartupEventArgs e) - { - this.RootVisual = new MainPage(); - } - - private void Application_Exit(object sender, EventArgs e) - { - - } - - private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) - { - // If the app is running outside of the debugger then report the exception using - // the browser's exception mechanism. On IE this will display it a yellow alert - // icon in the status bar and Firefox will display a script error. - if (!System.Diagnostics.Debugger.IsAttached) - { - - // NOTE: This will allow the application to continue running after an exception has been thrown - // but not handled. - // For production applications this error handling should be replaced with something that will - // report the error to the website and stop the application. - e.Handled = true; - Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); - } - } - - private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e) - { - try - { - string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace; - errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n"); - - System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");"); - } - catch (Exception) - { - } - } - } -} diff --git a/PocketSharp.Examples/PocketSharp.Silverlight/MainPage.xaml b/PocketSharp.Examples/PocketSharp.Silverlight/MainPage.xaml deleted file mode 100644 index ffb06e7..0000000 --- a/PocketSharp.Examples/PocketSharp.Silverlight/MainPage.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PocketSharp.WP7/MainPage.xaml.cs b/PocketSharp.WP7/MainPage.xaml.cs deleted file mode 100644 index cc6fb60..0000000 --- a/PocketSharp.WP7/MainPage.xaml.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.Phone.Controls; -using System.Windows; - -namespace PocketSharp.WP7 -{ - public partial class MainPage : PhoneApplicationPage - { - // Constructor - public MainPage() - { - InitializeComponent(); - - // Set the data context of the LongListSelector control to the sample data - DataContext = App.ViewModel; - } - - private async void Button_Click(object sender, RoutedEventArgs e) - { - await App.ViewModel.LoadData(); - } - } -} \ No newline at end of file diff --git a/PocketSharp.WP7/PocketSharp.WP7.csproj b/PocketSharp.WP7/PocketSharp.WP7.csproj deleted file mode 100644 index 9b52f06..0000000 --- a/PocketSharp.WP7/PocketSharp.WP7.csproj +++ /dev/null @@ -1,155 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2} - {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - PocketSharp.WP7 - PocketSharp.WP7 - v4.0 - $(TargetFrameworkVersion) - WindowsPhone71 - Silverlight - true - - - true - true - PocketSharp.WP7.xap - Properties\AppManifest.xml - PocketSharp.WP7.App - true - true - ..\ - true - - - true - full - false - Bin\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - Bin\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - - - - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\sl4-windowsphone71\Microsoft.Threading.Tasks.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\sl4-windowsphone71\Microsoft.Threading.Tasks.Extensions.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\sl4-windowsphone71\Microsoft.Threading.Tasks.Extensions.Phone.dll - - - False - ..\packages\Microsoft.Bcl.1.1.6\lib\sl4-windowsphone71\System.IO.dll - - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.dll - - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.Extensions.dll - - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.Primitives.dll - - - False - ..\packages\Microsoft.Bcl.1.1.6\lib\sl4-windowsphone71\System.Runtime.dll - - - False - ..\packages\Microsoft.Bcl.1.1.6\lib\sl4-windowsphone71\System.Threading.Tasks.dll - - - - - - - - - - - App.xaml - - - MainPage.xaml - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - - - - {817200C3-A327-4E35-9B5F-63A51C088577} - PocketSharp - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - \ No newline at end of file diff --git a/PocketSharp.WP7/Properties/AppManifest.xml b/PocketSharp.WP7/Properties/AppManifest.xml deleted file mode 100644 index 6712a11..0000000 --- a/PocketSharp.WP7/Properties/AppManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/PocketSharp.WP7/Properties/AssemblyInfo.cs b/PocketSharp.WP7/Properties/AssemblyInfo.cs deleted file mode 100644 index b102d2b..0000000 --- a/PocketSharp.WP7/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Resources; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PocketSharp.WP7")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PocketSharp.WP7")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("775e1575-245f-45be-85f8-e6289b22b330")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: NeutralResourcesLanguageAttribute("en-US")] diff --git a/PocketSharp.WP7/Properties/WMAppManifest.xml b/PocketSharp.WP7/Properties/WMAppManifest.xml deleted file mode 100644 index 79314b5..0000000 --- a/PocketSharp.WP7/Properties/WMAppManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - ApplicationIcon.png - - - - - - - - - - - - - - - - - - - - - - - Background.png - 0 - PocketSharp.WP7 - - - - - diff --git a/PocketSharp.WP7/SplashScreenImage.jpg b/PocketSharp.WP7/SplashScreenImage.jpg deleted file mode 100644 index 353b1927b9d397aac7f23098e427739615db19fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9417 zcmeH}dpK0v|HtDPw1DzpdZ%obNxsKYq{ma-Qe=JhS%m*?Xpd@ukwIs*Fu0FVSw2n-+r=Mb=+L2UaoABxxu zAiuvCgDVXH_zuX!cENe`_qMQ00C1KE#J{&$&!hj5hl}g!G;Hh5zCTX{;3J~-ezJDk z8DpepqGt?`W&*HUAKSl_)}8!I4%R;w{tC!TB6lKYkci!Ym^=b0j}X!THF)$A|LYqT z@jW5Lkm3>>P?Ay`rQrq*n*lKd5-BE*l#mdI1A$0@>j80j3G^-l%MA+70jS;Q6%8-v z+?P~8`m|liWdPJLI&&deYNN8smaQ1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zZa=iNO{V*i7aE~AExt5 zUrCr@ZS4sZ9ph09stY8k0dcHKsxlG9xe1Tzkwe)je47loni5ezjp1$Pr|T1Rw34}9 zZ95t2Di|ycn>Fs++D9H&zI8gnSWRkLrS(}Z{(ky0eA?pvhQ8KJ#$?KFmPf5pK?)W=_QKorGU6lW0wA_hbZh!_wtAYwqo UfQSJR10n`Q4E%c;KnlnH2jCM6ivR!s diff --git a/PocketSharp.WP7/ViewModels/ItemViewModel.cs b/PocketSharp.WP7/ViewModels/ItemViewModel.cs deleted file mode 100644 index fef68cb..0000000 --- a/PocketSharp.WP7/ViewModels/ItemViewModel.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.ComponentModel; - -namespace PocketSharp.WP7.ViewModels -{ - public class ItemViewModel : INotifyPropertyChanged - { - private string _id; - /// - /// Sample ViewModel property; this property is used to identify the object. - /// - /// - public string ID - { - get - { - return _id; - } - set - { - if (value != _id) - { - _id = value; - NotifyPropertyChanged("ID"); - } - } - } - - private string _lineOne; - /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. - /// - /// - public string LineOne - { - get - { - return _lineOne; - } - set - { - if (value != _lineOne) - { - _lineOne = value; - NotifyPropertyChanged("LineOne"); - } - } - } - - private string _lineTwo; - /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. - /// - /// - public string LineTwo - { - get - { - return _lineTwo; - } - set - { - if (value != _lineTwo) - { - _lineTwo = value; - NotifyPropertyChanged("LineTwo"); - } - } - } - - private string _lineThree; - /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. - /// - /// - public string LineThree - { - get - { - return _lineThree; - } - set - { - if (value != _lineThree) - { - _lineThree = value; - NotifyPropertyChanged("LineThree"); - } - } - } - - public event PropertyChangedEventHandler PropertyChanged; - private void NotifyPropertyChanged(String propertyName) - { - PropertyChangedEventHandler handler = PropertyChanged; - if (null != handler) - { - handler(this, new PropertyChangedEventArgs(propertyName)); - } - } - } -} \ No newline at end of file diff --git a/PocketSharp.WP7/ViewModels/MainViewModel.cs b/PocketSharp.WP7/ViewModels/MainViewModel.cs deleted file mode 100644 index c0fceb6..0000000 --- a/PocketSharp.WP7/ViewModels/MainViewModel.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Threading.Tasks; - -namespace PocketSharp.WP7.ViewModels -{ - public class MainViewModel : INotifyPropertyChanged - { - public MainViewModel() - { - this.Items = new ObservableCollection(); - } - - /// - /// A collection for ItemViewModel objects. - /// - public ObservableCollection Items { get; private set; } - - private string _sampleProperty = "Sample Runtime Property Value"; - /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding - /// - /// - public string SampleProperty - { - get - { - return _sampleProperty; - } - set - { - if (value != _sampleProperty) - { - _sampleProperty = value; - NotifyPropertyChanged("SampleProperty"); - } - } - } - - /// - /// Sample property that returns a localized string - /// - public string LocalizedSampleProperty - { - get - { - return "test"; - } - } - - public bool IsDataLoaded - { - get; - private set; - } - - /// - /// Creates and adds a few ItemViewModel objects into the Items collection. - /// - public async Task LoadData() - { - // !! please don't misuse this account !! - PocketClient client = new PocketClient( - consumerKey: "15396-f6f92101d72c8e270a6c9bb3", - callbackUri: "http://frontendplay.com", - accessCode: "80acf6c5-c198-03c0-b94c-e74402" - ); - - List items = null; - - try - { - items = await client.Get(); - - items.ForEach(item => - { - this.Items.Add(new ItemViewModel() - { - ID = item.ID.ToString(), - LineOne = item.Title, - LineTwo = item.Uri.ToString() - }); - }); - } - catch (PocketException ex) - { - Debug.WriteLine(ex.Message); - } - - this.IsDataLoaded = true; - } - - public event PropertyChangedEventHandler PropertyChanged; - private void NotifyPropertyChanged(String propertyName) - { - PropertyChangedEventHandler handler = PropertyChanged; - if (null != handler) - { - handler(this, new PropertyChangedEventArgs(propertyName)); - } - } - } -} \ No newline at end of file diff --git a/PocketSharp.WP7/packages.config b/PocketSharp.WP7/packages.config deleted file mode 100644 index 27d1237..0000000 --- a/PocketSharp.WP7/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/PocketSharp.sln b/PocketSharp.sln index 56b83a8..f75878b 100644 --- a/PocketSharp.sln +++ b/PocketSharp.sln @@ -1,20 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp", "PocketSharp\PocketSharp.csproj", "{817200C3-A327-4E35-9B5F-63A51C088577}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Wpf", "PocketSharp.Examples\PocketSharp.Wpf\PocketSharp.Wpf.csproj", "{775569C2-987F-4AC4-8BA5-A315A21ED1B7}" - ProjectSection(ProjectDependencies) = postProject - {817200C3-A327-4E35-9B5F-63A51C088577} = {817200C3-A327-4E35-9B5F-63A51C088577} - EndProjectSection -EndProject +# Visual Studio 2013 +VisualStudioVersion = 12.0.30324.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PocketSharp.Examples", "PocketSharp.Examples", "{AFD4E3F1-B23C-4924-BA5B-D917FBADB8FA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Silverlight", "PocketSharp.Examples\PocketSharp.Silverlight\PocketSharp.Silverlight.csproj", "{656345D2-AF4C-4F88-9C9F-EBF54D7691DB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.WP8", "PocketSharp.Examples\PocketSharp.WP8\PocketSharp.WP8.csproj", "{47721A56-2128-4C5A-8B92-995FFC353304}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Tests", "PocketSharp.Tests\PocketSharp.Tests.csproj", "{CA3C491B-A8CA-426C-A0BB-E91636767467}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19DD45B5-B849-49E7-89D6-16C89B9B96C7}" ProjectSection(SolutionItems) = preProject .nuget\NuGet.Config = .nuget\NuGet.Config @@ -22,7 +11,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19DD45 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.WP7", "PocketSharp.WP7\PocketSharp.WP7.csproj", "{6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp", "PocketSharp\PocketSharp.csproj", "{817200C3-A327-4E35-9B5F-63A51C088577}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Wpf", "PocketSharp.Examples\PocketSharp.Wpf\PocketSharp.Wpf.csproj", "{775569C2-987F-4AC4-8BA5-A315A21ED1B7}" + ProjectSection(ProjectDependencies) = postProject + {817200C3-A327-4E35-9B5F-63A51C088577} = {817200C3-A327-4E35-9B5F-63A51C088577} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.WP8", "PocketSharp.Examples\PocketSharp.WP8\PocketSharp.WP8.csproj", "{47721A56-2128-4C5A-8B92-995FFC353304}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Tests", "PocketSharp.Tests\PocketSharp.Tests.csproj", "{CA3C491B-A8CA-426C-A0BB-E91636767467}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -51,14 +49,6 @@ Global {775569C2-987F-4AC4-8BA5-A315A21ED1B7}.Release|Any CPU.Build.0 = Release|Any CPU {775569C2-987F-4AC4-8BA5-A315A21ED1B7}.Release|ARM.ActiveCfg = Release|Any CPU {775569C2-987F-4AC4-8BA5-A315A21ED1B7}.Release|x86.ActiveCfg = Release|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Debug|x86.ActiveCfg = Debug|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Release|Any CPU.Build.0 = Release|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Release|ARM.ActiveCfg = Release|Any CPU - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB}.Release|x86.ActiveCfg = Release|Any CPU {47721A56-2128-4C5A-8B92-995FFC353304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {47721A56-2128-4C5A-8B92-995FFC353304}.Debug|Any CPU.Build.0 = Debug|Any CPU {47721A56-2128-4C5A-8B92-995FFC353304}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -85,24 +75,12 @@ Global {CA3C491B-A8CA-426C-A0BB-E91636767467}.Release|Any CPU.Build.0 = Release|Any CPU {CA3C491B-A8CA-426C-A0BB-E91636767467}.Release|ARM.ActiveCfg = Release|Any CPU {CA3C491B-A8CA-426C-A0BB-E91636767467}.Release|x86.ActiveCfg = Release|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Debug|ARM.ActiveCfg = Debug|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Debug|x86.ActiveCfg = Debug|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Release|Any CPU.Build.0 = Release|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Release|Any CPU.Deploy.0 = Release|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Release|ARM.ActiveCfg = Release|Any CPU - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {775569C2-987F-4AC4-8BA5-A315A21ED1B7} = {AFD4E3F1-B23C-4924-BA5B-D917FBADB8FA} - {656345D2-AF4C-4F88-9C9F-EBF54D7691DB} = {AFD4E3F1-B23C-4924-BA5B-D917FBADB8FA} {47721A56-2128-4C5A-8B92-995FFC353304} = {AFD4E3F1-B23C-4924-BA5B-D917FBADB8FA} - {6F542037-C48B-4EC5-A326-DDBEBF5FDFA2} = {AFD4E3F1-B23C-4924-BA5B-D917FBADB8FA} EndGlobalSection EndGlobal diff --git a/PocketSharp/Components/Modify.cs b/PocketSharp/Components/Modify.cs index 19acb36..a4aeabe 100644 --- a/PocketSharp/Components/Modify.cs +++ b/PocketSharp/Components/Modify.cs @@ -24,6 +24,20 @@ namespace PocketSharp } + /// + /// Sends an action. + /// See: http://getpocket.com/developer/docs/v3/modify + /// + /// The action. + /// The cancellation token. + /// + /// + public async Task SendAction(PocketAction action, CancellationToken cancellationToken = default(CancellationToken)) + { + return await Send(new List() { action }, cancellationToken); + } + + /// /// Archives the specified item. /// diff --git a/PocketSharp/Fody.targets b/PocketSharp/Fody.targets deleted file mode 100644 index 9e81cba..0000000 --- a/PocketSharp/Fody.targets +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - $(NCrunchOriginalSolutionDir) - - - - - $(SolutionDir) - - - - - $(MSBuildProjectDirectory)\..\ - - - - - - - $(KeyOriginatorFile) - - - - - $(AssemblyOriginatorKeyFile) - - - - - - - - - - $(ProjectDir)$(IntermediateOutputPath) - $(SignAssembly) - $(MSBuildThisFileDirectory) - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PocketSharp/FodyWeavers.xml b/PocketSharp/FodyWeavers.xml index 7369928..df428ee 100644 --- a/PocketSharp/FodyWeavers.xml +++ b/PocketSharp/FodyWeavers.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/PocketSharp/Models/Parameters/Parameters.cs b/PocketSharp/Models/Parameters/Parameters.cs index 4512eba..87bea45 100644 --- a/PocketSharp/Models/Parameters/Parameters.cs +++ b/PocketSharp/Models/Parameters/Parameters.cs @@ -23,16 +23,26 @@ namespace PocketSharp.Models Dictionary parameterDict = new Dictionary(); // get object properties - IEnumerable properties = this.GetType() - .GetProperties(BindingFlags.Instance | BindingFlags.Public) - .Where(p => Attribute.IsDefined(p, typeof(DataMemberAttribute))); + IEnumerable properties = this.GetType() + .GetTypeInfo() + .DeclaredMembers + .Where(p => p.CustomAttributes.FirstOrDefault(a => a.AttributeType == typeof(DataMemberAttribute)) != null); // gather attributes of object - foreach (PropertyInfo propertyInfo in properties) + foreach (MemberInfo memberInfo in properties) { - DataMemberAttribute attribute = (DataMemberAttribute)propertyInfo.GetCustomAttributes(typeof(DataMemberAttribute‌), false).FirstOrDefault(); - string name = attribute.Name ?? propertyInfo.Name.ToLower(); - object value = propertyInfo.GetValue(this, null); + DataMemberAttribute attribute = (DataMemberAttribute)memberInfo.GetCustomAttributes(typeof(DataMemberAttribute‌), false).FirstOrDefault(); + string name = attribute.Name ?? memberInfo.Name.ToLower(); + object value = null; + + if (memberInfo is FieldInfo) + { + value = ((FieldInfo)memberInfo).GetValue(this); + } + else + { + value = ((PropertyInfo)memberInfo).GetValue(this, null); + } // invalid parameter if (value == null) diff --git a/PocketSharp/PocketSharp.csproj b/PocketSharp/PocketSharp.csproj index a823aac..55682a9 100644 --- a/PocketSharp/PocketSharp.csproj +++ b/PocketSharp/PocketSharp.csproj @@ -2,7 +2,7 @@ - 10.0 + 11.0 Debug AnyCPU {817200C3-A327-4E35-9B5F-63A51C088577} @@ -10,13 +10,33 @@ Properties PocketSharp PocketSharp - v4.0 - Profile96 + v4.5 + Profile259 512 {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ..\ true - ..\packages\Fody.1.20.0.0 + + + + + 4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + 10f8a946 true @@ -37,7 +57,7 @@ - + @@ -78,41 +98,38 @@ - - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.165\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.Extensions.dll - - ..\packages\Newtonsoft.Json.5.0.8\lib\portable-net40+sl4+wp7+win8\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.6.0.2\lib\portable-net40+sl5+wp80+win8+monotouch+monoandroid\Newtonsoft.Json.dll - ..\packages\PropertyChanged.Fody.1.45.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll + ..\packages\PropertyChanged.Fody.1.48.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll False - - ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.IO.dll - - ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.dll + ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll - ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Extensions.dll + ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll - ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Primitives.dll - - - ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.Runtime.dll - - - ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.Threading.Tasks.dll + ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + @@ -120,13 +137,14 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + - + + - - + + -