Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changes to fix the recent WP8 tile additions

1. Added nuget restore to the project so it will build outright on a
fresh pull
2. All three new tiles had been given the template "FlipTile",
corrected.
3. Nearly all three new tiles' xml wasn't being created because it was
just checking whether the Title property had a value, rather than the
correct property
4. New tiles were missing the TileId property
  • Loading branch information...
commit b57bf6576d77abc99986d7896dd6ff32ea15592a 1 parent cf5fd96
@ScottIsAFool ScottIsAFool authored
View
6 .nuget/NuGet.Config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
+</configuration>
View
BIN  .nuget/NuGet.exe
Binary file not shown
View
153 .nuget/NuGet.targets
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ <PackagesConfig>packages.config</PackagesConfig>
+ <PackagesDir>$(SolutionDir)packages</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(ResolveReferencesDependsOn);
+ </ResolveReferencesDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <EnvKey ParameterType="System.String" Required="true" />
+ <EnvValue ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
+ }
+ catch {
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+</Project>
View
3  PushSharp.Android/PushSharp.Google.csproj
@@ -11,6 +11,8 @@
<RootNamespace>PushSharp.Android</RootNamespace>
<AssemblyName>PushSharp.Android</AssemblyName>
<FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -81,6 +83,7 @@
<None Include="PushSharp-Signing.snk" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- 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.
<Target Name="BeforeBuild">
View
3  PushSharp.Apple/PushSharp.Apple.csproj
@@ -11,6 +11,8 @@
<RootNamespace>PushSharp.Apple</RootNamespace>
<AssemblyName>PushSharp.Apple</AssemblyName>
<FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -75,6 +77,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- 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.
<Target Name="BeforeBuild">
View
3  PushSharp.Windows/PushSharp.Windows.csproj
@@ -12,6 +12,8 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -75,6 +77,7 @@
<None Include="PushSharp-Signing.snk" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- 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.
<Target Name="BeforeBuild">
View
71 PushSharp.WindowsPhone/WindowsPhoneNotification.cs
@@ -204,17 +204,17 @@ public override string PayloadToString()
{
if (ClearBackTitle)
tile.Add(new XElement(wp + "BackTitle", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackTitle))
tile.Add(new XElement(wp + "BackTitle", XmlEncode(BackTitle)));
if (ClearBackBackgroundImage)
tile.Add(new XElement(wp + "BackBackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackBackgroundImage))
tile.Add(new XElement(wp + "BackBackgroundImage", XmlEncode(BackBackgroundImage)));
if (ClearBackContent)
tile.Add(new XElement(wp + "BackContent", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackContent))
tile.Add(new XElement(wp + "BackContent", XmlEncode(BackContent)));
}
@@ -229,6 +229,8 @@ public class WindowsPhoneFlipTile : WindowsPhoneNotification
public string Title { get; set; }
public bool ClearTitle { get; set; }
+ public string TileId { get; set; }
+
public string BackTitle { get; set; }
public bool ClearBackTitle { get; set; }
@@ -263,6 +265,9 @@ public override string PayloadToString()
var tile = new XElement(wp + "Tile", new XAttribute("Template", "FlipTile"));
+ if (!string.IsNullOrEmpty(this.TileId))
+ tile.Add(new XAttribute("Id", XmlEncode(this.TileId)));
+
if (ClearTitle)
tile.Add(new XElement(wp + "Title", new XAttribute("Action", "Clear")));
else if (!string.IsNullOrEmpty(Title))
@@ -270,17 +275,17 @@ public override string PayloadToString()
if (ClearBackTitle)
tile.Add(new XElement(wp + "BackTitle", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackTitle))
tile.Add(new XElement(wp + "BackTitle", XmlEncode(BackTitle)));
if (ClearBackContent)
tile.Add(new XElement(wp + "BackContent", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackContent))
tile.Add(new XElement(wp + "BackContent", XmlEncode(BackContent)));
if (ClearWideBackContent)
tile.Add(new XElement(wp + "WideBackContent", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideBackContent))
tile.Add(new XElement(wp + "WideBackContent", XmlEncode(WideBackContent)));
if (ClearCount)
@@ -290,27 +295,27 @@ public override string PayloadToString()
if (ClearSmallBackgroundImage)
tile.Add(new XElement(wp + "SmallBackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(SmallBackgroundImage))
tile.Add(new XElement(wp + "SmallBackgroundImage", XmlEncode(SmallBackgroundImage)));
if (ClearBackgroundImage)
tile.Add(new XElement(wp + "BackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackgroundImage))
tile.Add(new XElement(wp + "BackgroundImage", XmlEncode(BackgroundImage)));
if (ClearBackBackgroundImage)
tile.Add(new XElement(wp + "BackBackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackBackgroundImage))
tile.Add(new XElement(wp + "BackBackgroundImage", XmlEncode(BackBackgroundImage)));
if (ClearWideBackgroundImage)
tile.Add(new XElement(wp + "WideBackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideBackgroundImage))
tile.Add(new XElement(wp + "WideBackgroundImage", XmlEncode(WideBackgroundImage)));
if (ClearWideBackBackgroundImage)
tile.Add(new XElement(wp + "WideBackBackgroundImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideBackBackgroundImage))
tile.Add(new XElement(wp + "WideBackBackgroundImage", XmlEncode(WideBackBackgroundImage)));
notification.Add(tile);
@@ -324,6 +329,8 @@ public class WindowsPhoneIconicTile : WindowsPhoneNotification
public string Title { get; set; }
public bool ClearTitle { get; set; }
+ public string TileId { get; set; }
+
public string WideContent1 { get; set; }
public bool ClearWideContent1 { get; set; }
@@ -351,7 +358,10 @@ public override string PayloadToString()
XNamespace wp = "WPNotification";
var notification = new XElement(wp + "Notification", new XAttribute(XNamespace.Xmlns + "wp", "WPNotification"));
- var tile = new XElement(wp + "Tile", new XAttribute("Template", "FlipTile"));
+ var tile = new XElement(wp + "Tile", new XAttribute("Template", "IconicTile"));
+
+ if (!string.IsNullOrEmpty(this.TileId))
+ tile.Add(new XAttribute("Id", XmlEncode(this.TileId)));
if (ClearTitle)
tile.Add(new XElement(wp + "Title", new XAttribute("Action", "Clear")));
@@ -360,17 +370,17 @@ public override string PayloadToString()
if (ClearWideContent1)
tile.Add(new XElement(wp + "WideContent1", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideContent1))
tile.Add(new XElement(wp + "WideContent1", XmlEncode(WideContent1)));
if (ClearWideContent2)
tile.Add(new XElement(wp + "WideContent2", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideContent2))
tile.Add(new XElement(wp + "WideContent2", XmlEncode(WideContent2)));
if (ClearWideContent3)
tile.Add(new XElement(wp + "WideContent3", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(WideContent3))
tile.Add(new XElement(wp + "WideContent3", XmlEncode(WideContent3)));
if (ClearCount)
@@ -380,17 +390,17 @@ public override string PayloadToString()
if (ClearSmallIconImage)
tile.Add(new XElement(wp + "SmallIconImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(SmallIconImage))
tile.Add(new XElement(wp + "SmallIconImage", XmlEncode(SmallIconImage)));
if (ClearIconImage)
tile.Add(new XElement(wp + "IconImage", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(IconImage))
tile.Add(new XElement(wp + "IconImage", XmlEncode(IconImage)));
if (ClearBackgroundColor)
tile.Add(new XElement(wp + "BackgroundColor", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(BackgroundColor))
tile.Add(new XElement(wp + "BackgroundColor", XmlEncode(BackgroundColor)));
notification.Add(tile);
@@ -407,6 +417,8 @@ public class WindowsPhoneCycleTile : WindowsPhoneNotification
public int? Count { get; set; }
public bool ClearCount { get; set; }
+ public string TileId { get; set; }
+
public string CycleImage1 { get; set; }
public bool ClearCycleImage1 { get; set; }
@@ -439,7 +451,10 @@ public override string PayloadToString()
XNamespace wp = "WPNotification";
var notification = new XElement(wp + "Notification", new XAttribute(XNamespace.Xmlns + "wp", "WPNotification"));
- var tile = new XElement(wp + "Tile", new XAttribute("Template", "FlipTile"));
+ var tile = new XElement(wp + "Tile", new XAttribute("Template", "CycleTile"));
+
+ if (!string.IsNullOrEmpty(this.TileId))
+ tile.Add(new XAttribute("Id", XmlEncode(this.TileId)));
if (ClearTitle)
tile.Add(new XElement(wp + "Title", new XAttribute("Action", "Clear")));
@@ -453,47 +468,47 @@ public override string PayloadToString()
if (ClearCycleImage1)
tile.Add(new XElement(wp + "CycleImage1", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage1))
tile.Add(new XElement(wp + "CycleImage1", XmlEncode(CycleImage1)));
if (ClearCycleImage2)
tile.Add(new XElement(wp + "CycleImage2", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage2))
tile.Add(new XElement(wp + "CycleImage2", XmlEncode(CycleImage2)));
if (ClearCycleImage3)
tile.Add(new XElement(wp + "CycleImage3", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage3))
tile.Add(new XElement(wp + "CycleImage3", XmlEncode(CycleImage3)));
if (ClearCycleImage4)
tile.Add(new XElement(wp + "CycleImage4", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage4))
tile.Add(new XElement(wp + "CycleImage4", XmlEncode(CycleImage4)));
if (ClearCycleImage5)
tile.Add(new XElement(wp + "CycleImage5", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage5))
tile.Add(new XElement(wp + "CycleImage5", XmlEncode(CycleImage5)));
if (ClearCycleImage6)
tile.Add(new XElement(wp + "CycleImage6", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage6))
tile.Add(new XElement(wp + "CycleImage6", XmlEncode(CycleImage6)));
if (ClearCycleImage7)
tile.Add(new XElement(wp + "CycleImage7", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage7))
tile.Add(new XElement(wp + "CycleImage7", XmlEncode(CycleImage7)));
if (ClearCycleImage8)
tile.Add(new XElement(wp + "CycleImage8", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage8))
tile.Add(new XElement(wp + "CycleImage8", XmlEncode(CycleImage8)));
if (ClearCycleImage9)
tile.Add(new XElement(wp + "CycleImage9", new XAttribute("Action", "Clear")));
- else if (!string.IsNullOrEmpty(Title))
+ else if (!string.IsNullOrEmpty(CycleImage9))
tile.Add(new XElement(wp + "CycleImage9", XmlEncode(CycleImage9)));
notification.Add(tile);
View
10 PushSharp.WindowsPhone/WindowsPhonePushChannel.cs
@@ -40,7 +40,10 @@ protected override void SendNotification(Notification notification)
mediumValue = 12;
slowValue = 22;
}
- else if (wpNotification is WindowsPhoneTileNotification)
+ else if (wpNotification is WindowsPhoneTileNotification ||
+ wpNotification is WindowsPhoneCycleTile ||
+ wpNotification is WindowsPhoneFlipTile ||
+ wpNotification is WindowsPhoneIconicTile)
{
immediateValue = 1;
mediumValue = 11;
@@ -61,7 +64,10 @@ protected override void SendNotification(Notification notification)
if (wpNotification is WindowsPhoneToastNotification)
wr.Headers.Add("X-WindowsPhone-Target", "toast");
- else if (wpNotification is WindowsPhoneTileNotification)
+ else if (wpNotification is WindowsPhoneTileNotification ||
+ wpNotification is WindowsPhoneCycleTile ||
+ wpNotification is WindowsPhoneFlipTile ||
+ wpNotification is WindowsPhoneIconicTile)
wr.Headers.Add("X-WindowsPhone-Target", "token");
if (wpNotification.MessageID != null)
View
18 PushSharp.WindowsPhone/WindowsPhonePushFluent.cs
@@ -263,6 +263,12 @@ public static WindowsPhoneFlipTile WithTitle(this WindowsPhoneFlipTile n, string
return n;
}
+ public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
+ {
+ n.TileId = tileId;
+ return n;
+ }
+
public static WindowsPhoneFlipTile WithCount(this WindowsPhoneFlipTile n, int count)
{
n.Count = count;
@@ -393,6 +399,12 @@ public static WindowsPhoneIconicTile ForEndpointUri(this WindowsPhoneIconicTile
return n;
}
+ public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
+ {
+ n.TileId = tileId;
+ return n;
+ }
+
public static WindowsPhoneIconicTile WithCallbackUri(this WindowsPhoneIconicTile n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
@@ -527,6 +539,12 @@ public static WindowsPhoneCycleTile ForEndpointUri(this WindowsPhoneCycleTile n,
return n;
}
+ public static WindowsPhoneTileNotification WithTileId(this WindowsPhoneTileNotification n, string tileId)
+ {
+ n.TileId = tileId;
+ return n;
+ }
+
public static WindowsPhoneCycleTile WithCallbackUri(this WindowsPhoneCycleTile n, Uri callbackUri)
{
n.CallbackURI = callbackUri.ToString();
View
7 PushSharp.sln
@@ -26,6 +26,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
PushSharp-Signing.snk = PushSharp-Signing.snk
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1C75975F-3C46-443D-8CB1-3CF5841B1DC8}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Please sign in to comment.
Something went wrong with that request. Please try again.