commit 70c92d595fe0fa6a51ed269ed90f3f65ef9dd532 Author: ScottIsAFool Date: Fri Nov 29 07:22:28 2013 +0000 First commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..760add1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,216 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +*.nupkg + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config new file mode 100644 index 0000000..67f8ea0 --- /dev/null +++ b/.nuget/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe new file mode 100644 index 0000000..8f61340 Binary files /dev/null and b/.nuget/NuGet.exe differ diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets new file mode 100644 index 0000000..83fe906 --- /dev/null +++ b/.nuget/NuGet.targets @@ -0,0 +1,136 @@ + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) + + + + + $(SolutionDir).nuget + packages.config + + + + + $(NuGetToolsPath)\NuGet.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 $(NuGetExePath) + + $(TargetDir.Trim('\\')) + + -RequireConsent + -NonInteractive + + "$(SolutionDir) " + "$(SolutionDir)" + + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) + $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(BuildDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PocketWP.sln b/PocketWP.sln new file mode 100644 index 0000000..1fcc5d8 --- /dev/null +++ b/PocketWP.sln @@ -0,0 +1,47 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketWP", "PocketWP\PocketWP.csproj", "{52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{08716B21-1C68-4BCF-8E35-3FAA718C9076}" + ProjectSection(SolutionItems) = preProject + .nuget\NuGet.Config = .nuget\NuGet.Config + .nuget\NuGet.exe = .nuget\NuGet.exe + .nuget\NuGet.targets = .nuget\NuGet.targets + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BDECA2FF-74C2-4921-9ED0-3DBB479979F5}" + ProjectSection(SolutionItems) = preProject + nuspec.2010.7.xsd = nuspec.2010.7.xsd + nuspec.2011.8.xsd = nuspec.2011.8.xsd + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|ARM.ActiveCfg = Debug|ARM + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|ARM.Build.0 = Debug|ARM + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|x86.ActiveCfg = Debug|x86 + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Debug|x86.Build.0 = Debug|x86 + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|Any CPU.Build.0 = Release|Any CPU + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|ARM.ActiveCfg = Release|ARM + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|ARM.Build.0 = Release|ARM + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|x86.ActiveCfg = Release|x86 + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocketWP/AddType.cs b/PocketWP/AddType.cs new file mode 100644 index 0000000..b7cfa3d --- /dev/null +++ b/PocketWP/AddType.cs @@ -0,0 +1,8 @@ +namespace PocketWP +{ + public enum AddType + { + Single, + Multiple + } +} diff --git a/PocketWP/ExternalPocketItem.cs b/PocketWP/ExternalPocketItem.cs new file mode 100644 index 0000000..ba24ab0 --- /dev/null +++ b/PocketWP/ExternalPocketItem.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Json; +using System.Text; +using PropertyChanged; + +namespace PocketWP +{ + [ImplementPropertyChanged] + [DataContract] + public class ExternalPocketItem + { + /// + /// Gets or sets the URI. + /// + /// + /// The URI. + /// + [DataMember] + public string Uri { get; set; } + /// + /// Gets or sets the tags. + /// + /// + /// The tags. + /// + [DataMember] + public string Tags { get; set; } + /// + /// Gets or sets the title. + /// + /// + /// The title. + /// + [DataMember] + public string Title { get; set; } + /// + /// Gets or sets the tweet identifier. + /// + /// + /// The tweet identifier. + /// + [DataMember] + public string TweetId { get; set; } + /// + /// Gets or sets the callback URI for your app if you want to be called back after adding. + /// + /// + /// The callback URI. + /// + public string CallbackUri { get; set; } + [DataMember] + public AddType Type { get; internal set; } + [DataMember] + public List Urls { get; set; } + + [IgnoreDataMember] + public string[] TagsArray + { + get + { + return string.IsNullOrEmpty(Tags) ? null : Tags.Split(','); + } + } + + public string ToEscapedJson() + { + var serialiser = new DataContractJsonSerializer(typeof(ExternalPocketItem)); + using (var stream = new MemoryStream()) + { + serialiser.WriteObject(stream, this); + + var json = Encoding.UTF8.GetString(stream.ToArray(), 0, (int)stream.Length); + return System.Uri.EscapeDataString(json); + } + } + } +} diff --git a/PocketWP/Fody.targets b/PocketWP/Fody.targets new file mode 100644 index 0000000..a668a51 --- /dev/null +++ b/PocketWP/Fody.targets @@ -0,0 +1,89 @@ + + + + + + $(NCrunchOriginalSolutionDir) + + + + + $(SolutionDir) + + + + + $(MSBuildProjectDirectory)\..\ + + + + + + + $(KeyOriginatorFile) + + + + + $(AssemblyOriginatorKeyFile) + + + + + + + + + + $(ProjectDir)$(IntermediateOutputPath) + Low + $(SignAssembly) + $(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PocketWP/FodyWeavers.xml b/PocketWP/FodyWeavers.xml new file mode 100644 index 0000000..bb0f322 --- /dev/null +++ b/PocketWP/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/PocketWP/PocketHelper.cs b/PocketWP/PocketHelper.cs new file mode 100644 index 0000000..3c046e6 --- /dev/null +++ b/PocketWP/PocketHelper.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Runtime.Serialization.Json; +using System.Text; + +namespace PocketWP +{ + public static class PocketHelper + { + private const string PocketScheme = "pocket:"; + private const string PocketUrl = PocketScheme + "Add?item="; + + /// + /// Adds a single item to Pocket + /// + /// The URI. + /// The tags. + /// The title. + /// The tweet identifier. + /// The callback URI for your app if you want to be called back after adding. + public static void AddItemToPocket(Uri uri, string tags = null, string title = null, string tweetId = null, string callbackUri = null) + { + AddItemToPocket(uri.ToString(), tags, title, tweetId, callbackUri); + } + + /// + /// Adds a single item to Pocket + /// + /// The URI. + /// The tags. + /// The title. + /// The tweet identifier. + /// The callback URI for your app if you want to be called back after adding. + public static void AddItemToPocket(string uri, string tags = null, string title = null, string tweetId = null, string callbackUri = null) + { + AddToPocket(new ExternalPocketItem + { + Uri = uri, + Tags = tags, + Title = title, + TweetId = tweetId, + CallbackUri = callbackUri, + Type = AddType.Single + }); + } + + /// + /// Adds multiple items to Pocket + /// + /// The URIs. + /// The tags. + /// The callback URI for your app if you want to be called back after adding. + public static void AddItemsToPocket(List urls, string tags = null, string callbackUri = null) + { + AddToPocket(new ExternalPocketItem + { + Urls = urls, + Tags = tags, + CallbackUri = callbackUri, + Type = AddType.Multiple + }); + } + + /// + /// Buries my nut. + /// + /// The item. + /// item;Your nut can't be null + private static async void AddToPocket(ExternalPocketItem item) + { + if (item == null) + { + throw new ArgumentNullException("item", "Your item can't be null"); + } + + var url = PocketUrl + item.ToEscapedJson(); + + await Windows.System.Launcher.LaunchUriAsync(new Uri(url)); + } + + /// + /// Determines whether the specified URI has nuts. + /// + /// The URI. + /// True if nut is present + public static bool HasPocketItem(Uri uri) + { + // /Protocol?encodedLaunchUri=squirrel%3AAddNut%3Fnut%3D + return uri.ToString().Contains(HttpUtility.UrlEncode(PocketUrl)); + } + + /// + /// Retrieves the nut. + /// + /// The URI. + /// The deserialised nut + public static ExternalPocketItem RetrievePocketItem(Uri uri) + { + var pocketUri = uri.ToString().Replace("/Protocol?encodedLaunchUri=", string.Empty); + pocketUri = Uri.UnescapeDataString(pocketUri).Replace(PocketUrl, string.Empty); + + var itemJson = Uri.UnescapeDataString(pocketUri); + + try + { + var serializer = new DataContractJsonSerializer(typeof(ExternalPocketItem)); + using (var reader = new MemoryStream(Encoding.UTF8.GetBytes(itemJson))) + { + return (ExternalPocketItem)serializer.ReadObject(reader); + } + } + catch + { + return null; + } + } + } +} diff --git a/PocketWP/PocketWP.csproj b/PocketWP/PocketWP.csproj new file mode 100644 index 0000000..00031ea --- /dev/null +++ b/PocketWP/PocketWP.csproj @@ -0,0 +1,130 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {52C281B4-A54E-4FD6-B4AF-9CEB8D0A7115} + {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + PocketWP + PocketWP + WindowsPhone + v8.0 + $(TargetFrameworkVersion) + false + true + 11.0 + true + ..\packages\Fody.1.18.0.0 + ..\ + true + PocketWP.nuspec + + + 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 + + + true + full + false + Bin\x86\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + pdbonly + true + Bin\x86\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + true + full + false + Bin\ARM\Debug + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + pdbonly + true + Bin\ARM\Release + TRACE;SILVERLIGHT;WINDOWS_PHONE + true + true + prompt + 4 + + + + + + + + + + + + + + Designer + + + Designer + + + + + + + ..\packages\PropertyChanged.Fody.1.42.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll + False + + + + + + + + + "$(SolutionDir).nuget\nuget.exe" pack "$(ProjectPath)" -OutputDirectory ./../../../ + + + \ No newline at end of file diff --git a/PocketWP/PocketWP.nuspec b/PocketWP/PocketWP.nuspec new file mode 100644 index 0000000..ac511fd --- /dev/null +++ b/PocketWP/PocketWP.nuspec @@ -0,0 +1,27 @@ + + + + + $version$ + ScottIsAFool + + PocketWP + + <requireLicenseAcceptance>false</requireLicenseAcceptance> + <projectUrl>https://github.com/ScottIsAFool/PocketWP</projectUrl> + <description>A helper file for those wanting to send items to a Pocket client on Windows Phone, as well as those building Pocket clients for Windows Phone in order to manage the shared uri scheme</description> + </metadata> + <files /> +</package> \ No newline at end of file diff --git a/PocketWP/Properties/AssemblyInfo.cs b/PocketWP/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d917bec --- /dev/null +++ b/PocketWP/Properties/AssemblyInfo.cs @@ -0,0 +1,37 @@ +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("PocketWP")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PocketWP")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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("52c281b4-a54e-4fd6-b4af-9ceb8d0a7115")] + +// 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/PocketWP/nuspec.2010.7.xsd b/PocketWP/nuspec.2010.7.xsd new file mode 100644 index 0000000..a467453 --- /dev/null +++ b/PocketWP/nuspec.2010.7.xsd @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="nuspec" + targetNamespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + xmlns:mstns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema" +> + <xs:element name="package"> + <xs:complexType> + <xs:sequence> + <xs:element name="metadata" maxOccurs="1" minOccurs="1"> + <xs:complexType> + <xs:all> + <xs:element name="id" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="version" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="title" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="authors" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="owners" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="licenseUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="projectUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="iconUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="requireLicenseAcceptance" maxOccurs="1" minOccurs="0" type="xs:boolean" /> + <xs:element name="description" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="summary" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="releaseNotes" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="copyright" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="language" maxOccurs="1" minOccurs="0" type="xs:string" default="en-US" /> + <xs:element name="tags" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="dependencies" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="dependency" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="id" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="frameworkAssemblies" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="frameworkAssembly" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="assemblyName" type="xs:string" use="required" /> + <xs:attribute name="targetFramework" type="xs:string" use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="references" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="reference" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="file" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="files" minOccurs="0" maxOccurs="1" nillable="true"> + <xs:complexType> + <xs:sequence> + <xs:element name="file" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="src" use="required" type="xs:string" /> + <xs:attribute name="target" use="optional" type="xs:string" /> + <xs:attribute name="exclude" use="optional" type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/PocketWP/nuspec.2011.8.xsd b/PocketWP/nuspec.2011.8.xsd new file mode 100644 index 0000000..d4d59a3 --- /dev/null +++ b/PocketWP/nuspec.2011.8.xsd @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="nuspec" + targetNamespace="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + xmlns:mstns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema" +> + <xs:element name="package"> + <xs:complexType> + <xs:sequence> + <xs:element name="metadata" + maxOccurs="1" + minOccurs="1"> + <xs:complexType> + <xs:all> + <xs:element name="id" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="version" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="title" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="authors" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="owners" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="licenseUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="projectUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="iconUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="requireLicenseAcceptance" + maxOccurs="1" + minOccurs="0" + type="xs:boolean" /> + <xs:element name="description" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="summary" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="releaseNotes" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="copyright" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="language" + maxOccurs="1" + minOccurs="0" + type="xs:string" + default="en-US" /> + <xs:element name="tags" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="dependencies" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="dependency" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="id" + type="xs:string" + use="required" /> + <xs:attribute name="version" + type="xs:string" + use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="frameworkAssemblies" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="frameworkAssembly" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="assemblyName" + type="xs:string" + use="required" /> + <xs:attribute name="targetFramework" + type="xs:string" + use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="references" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="reference" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="file" + type="xs:string" + use="required" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="files" + minOccurs="0" + maxOccurs="1" + nillable="true"> + <xs:complexType> + <xs:sequence> + <xs:element name="file" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="src" + use="required" + type="xs:string" /> + <xs:attribute name="target" + use="optional" + type="xs:string" /> + <xs:attribute name="exclude" + use="optional" + type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/PocketWP/packages.config b/PocketWP/packages.config new file mode 100644 index 0000000..94bfc63 --- /dev/null +++ b/PocketWP/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Fody" version="1.18.0.0" targetFramework="wp80" /> + <package id="PropertyChanged.Fody" version="1.42.0.0" targetFramework="wp80" /> +</packages> \ No newline at end of file diff --git a/nuspec.2010.7.xsd b/nuspec.2010.7.xsd new file mode 100644 index 0000000..a467453 --- /dev/null +++ b/nuspec.2010.7.xsd @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="nuspec" + targetNamespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + xmlns:mstns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema" +> + <xs:element name="package"> + <xs:complexType> + <xs:sequence> + <xs:element name="metadata" maxOccurs="1" minOccurs="1"> + <xs:complexType> + <xs:all> + <xs:element name="id" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="version" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="title" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="authors" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="owners" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="licenseUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="projectUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="iconUrl" maxOccurs="1" minOccurs="0" type="xs:anyURI" /> + <xs:element name="requireLicenseAcceptance" maxOccurs="1" minOccurs="0" type="xs:boolean" /> + <xs:element name="description" maxOccurs="1" minOccurs="1" type="xs:string" /> + <xs:element name="summary" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="releaseNotes" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="copyright" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="language" maxOccurs="1" minOccurs="0" type="xs:string" default="en-US" /> + <xs:element name="tags" maxOccurs="1" minOccurs="0" type="xs:string" /> + <xs:element name="dependencies" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="dependency" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="id" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="frameworkAssemblies" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="frameworkAssembly" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="assemblyName" type="xs:string" use="required" /> + <xs:attribute name="targetFramework" type="xs:string" use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="references" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="reference" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="file" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="files" minOccurs="0" maxOccurs="1" nillable="true"> + <xs:complexType> + <xs:sequence> + <xs:element name="file" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="src" use="required" type="xs:string" /> + <xs:attribute name="target" use="optional" type="xs:string" /> + <xs:attribute name="exclude" use="optional" type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/nuspec.2011.8.xsd b/nuspec.2011.8.xsd new file mode 100644 index 0000000..d4d59a3 --- /dev/null +++ b/nuspec.2011.8.xsd @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="nuspec" + targetNamespace="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + xmlns:mstns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema" +> + <xs:element name="package"> + <xs:complexType> + <xs:sequence> + <xs:element name="metadata" + maxOccurs="1" + minOccurs="1"> + <xs:complexType> + <xs:all> + <xs:element name="id" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="version" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="title" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="authors" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="owners" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="licenseUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="projectUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="iconUrl" + maxOccurs="1" + minOccurs="0" + type="xs:anyURI" /> + <xs:element name="requireLicenseAcceptance" + maxOccurs="1" + minOccurs="0" + type="xs:boolean" /> + <xs:element name="description" + maxOccurs="1" + minOccurs="1" + type="xs:string" /> + <xs:element name="summary" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="releaseNotes" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="copyright" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="language" + maxOccurs="1" + minOccurs="0" + type="xs:string" + default="en-US" /> + <xs:element name="tags" + maxOccurs="1" + minOccurs="0" + type="xs:string" /> + <xs:element name="dependencies" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="dependency" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="id" + type="xs:string" + use="required" /> + <xs:attribute name="version" + type="xs:string" + use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="frameworkAssemblies" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="frameworkAssembly" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="assemblyName" + type="xs:string" + use="required" /> + <xs:attribute name="targetFramework" + type="xs:string" + use="optional" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="references" + maxOccurs="1" + minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="reference" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="file" + type="xs:string" + use="required" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="files" + minOccurs="0" + maxOccurs="1" + nillable="true"> + <xs:complexType> + <xs:sequence> + <xs:element name="file" + minOccurs="0" + maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="src" + use="required" + type="xs:string" /> + <xs:attribute name="target" + use="optional" + type="xs:string" /> + <xs:attribute name="exclude" + use="optional" + type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema>