merge to master
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
### 4.1.6 (2014-08-28)
|
||||||
|
|
||||||
|
- Fix DateTime conversion issue (from local to UTC)
|
||||||
|
|
||||||
|
>>>>>>> simple
|
||||||
### 4.1.5 (2014-07-27)
|
### 4.1.5 (2014-07-27)
|
||||||
|
|
||||||
- Fix StackOverflow bug in PocketItem equality overload (fixes #28)
|
- Fix StackOverflow bug in PocketItem equality overload (fixes #28)
|
||||||
|
|||||||
@@ -33,23 +33,23 @@ namespace PocketSharp.Tests
|
|||||||
Assert.True(item.Uri == itemDuplicate.Uri);
|
Assert.True(item.Uri == itemDuplicate.Uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
// [Fact]
|
||||||
public async Task IsItemJsonPopulated()
|
// public async Task IsItemJsonPopulated()
|
||||||
{
|
// {
|
||||||
List<PocketItem> items = (await client.Get()).ToList();
|
// List<PocketItem> items = (await client.Get()).ToList();
|
||||||
string schemaJson = @"{
|
// string schemaJson = @"{
|
||||||
'description': 'PocketItem',
|
// 'description': 'PocketItem',
|
||||||
'type': 'object'
|
// 'type': 'object'
|
||||||
}";
|
// }";
|
||||||
|
|
||||||
JsonSchema schema = JsonSchema.Parse(schemaJson);
|
// JsonSchema schema = JsonSchema.Parse(schemaJson);
|
||||||
foreach (var pocketItem in items)
|
// foreach (var pocketItem in items)
|
||||||
{
|
// {
|
||||||
Assert.True(!string.IsNullOrWhiteSpace(pocketItem.Json));
|
// Assert.True(!string.IsNullOrWhiteSpace(pocketItem.Json));
|
||||||
var jObject = JObject.Parse(pocketItem.Json);
|
// var jObject = JObject.Parse(pocketItem.Json);
|
||||||
Assert.True(jObject.IsValid(schema));
|
// Assert.True(jObject.IsValid(schema));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task AreFilteredItemsRetrieved()
|
public async Task AreFilteredItemsRetrieved()
|
||||||
@@ -194,7 +194,7 @@ namespace PocketSharp.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task IsSinceParameterWorkingOnAddTags()
|
public async Task IsSinceParameterWorkingOnAddTags()
|
||||||
{
|
{
|
||||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
DateTime since = DateTime.Now;
|
||||||
|
|
||||||
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||||
PocketItem itemToModify = items.First();
|
PocketItem itemToModify = items.First();
|
||||||
@@ -218,7 +218,7 @@ namespace PocketSharp.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task IsSinceParameterWorkingOnFavoriteAndArchiveModification()
|
public async Task IsSinceParameterWorkingOnFavoriteAndArchiveModification()
|
||||||
{
|
{
|
||||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
DateTime since = DateTime.Now;//1409221736
|
||||||
|
|
||||||
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||||
PocketItem itemToModify = items.First();
|
PocketItem itemToModify = items.First();
|
||||||
@@ -237,7 +237,7 @@ namespace PocketSharp.Tests
|
|||||||
|
|
||||||
await client.Unfavorite(itemToModify);
|
await client.Unfavorite(itemToModify);
|
||||||
|
|
||||||
since = DateTime.UtcNow.AddMinutes(-1);
|
since = DateTime.Now;
|
||||||
|
|
||||||
await client.Archive(itemToModify);
|
await client.Archive(itemToModify);
|
||||||
|
|
||||||
@@ -249,10 +249,32 @@ namespace PocketSharp.Tests
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task IsUTCSinceParameterWorking()
|
||||||
|
{
|
||||||
|
DateTime since = DateTime.UtcNow;
|
||||||
|
|
||||||
|
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||||
|
PocketItem itemToModify = items.First();
|
||||||
|
|
||||||
|
items = await client.Get(state: State.all, since: since);
|
||||||
|
|
||||||
|
Assert.True(items == null || items.Count() == 0);
|
||||||
|
|
||||||
|
await client.Favorite(itemToModify);
|
||||||
|
|
||||||
|
items = await client.Get(state: State.all, since: since);
|
||||||
|
|
||||||
|
Assert.True(items.Count() > 0);
|
||||||
|
|
||||||
|
await client.Unfavorite(itemToModify);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task IsSinceParameterWorkingOnAddAndDelete()
|
public async Task IsSinceParameterWorkingOnAddAndDelete()
|
||||||
{
|
{
|
||||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
DateTime since = DateTime.UtcNow;
|
||||||
|
|
||||||
PocketItem item = await client.Add(new Uri("http://frontendplay.com"));
|
PocketItem item = await client.Add(new Uri("http://frontendplay.com"));
|
||||||
|
|
||||||
|
|||||||
@@ -39,29 +39,30 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.166\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.166\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
|
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.166\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Net" />
|
<Reference Include="System.Net" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Net.Http.Extensions, Version=2.2.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Extensions, Version=2.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.19\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Primitives, Version=4.2.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.19\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="xunit">
|
<Reference Include="xunit">
|
||||||
|
|||||||
@@ -105,13 +105,27 @@ namespace PocketSharp.Tests
|
|||||||
string[] tag;
|
string[] tag;
|
||||||
Random rnd = new Random();
|
Random rnd = new Random();
|
||||||
|
|
||||||
foreach (string url in urls.Skip(offset).Take(count))
|
var items = urls.Skip(offset).Take(count)
|
||||||
|
.Select((value, idx) => new { Value = value, Index = idx })
|
||||||
|
.GroupBy(item => item.Index / 100, item => item.Value)
|
||||||
|
.Cast<IEnumerable<string>>();
|
||||||
|
|
||||||
|
foreach (IEnumerable<string> urlGroup in items)
|
||||||
{
|
{
|
||||||
r = rnd.Next(tags.Length);
|
await Task.WhenAll(urlGroup.Select(url =>
|
||||||
r2 = rnd.Next(tags.Length);
|
{
|
||||||
tag = new string[] { tags[r], tags[r2] };
|
r = rnd.Next(tags.Length);
|
||||||
await client.Add(new Uri("http://" + url), tag);
|
r2 = rnd.Next(tags.Length);
|
||||||
|
tag = new string[] { tags[r], tags[r2] };
|
||||||
|
return client.Add(new Uri("http://" + url), tag);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[Fact]
|
||||||
|
//public async Task Fillll()
|
||||||
|
//{
|
||||||
|
// await FillAccount(11000, 89999);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.19.0" newVersion="4.2.19.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.2.28.0" newVersion="4.2.28.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.Bcl" version="1.1.7" targetFramework="net45" />
|
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
|
||||||
<package id="Microsoft.Bcl.Async" version="1.0.166" targetFramework="net45" />
|
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
|
||||||
<package id="Microsoft.Net.Http" version="2.2.19" targetFramework="net45" />
|
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
|
||||||
<package id="xunit" version="1.9.2" targetFramework="net45" />
|
<package id="xunit" version="1.9.2" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -53,7 +53,7 @@ namespace PocketSharp
|
|||||||
DetailType = DetailType.complete,
|
DetailType = DetailType.complete,
|
||||||
Search = search,
|
Search = search,
|
||||||
Domain = domain,
|
Domain = domain,
|
||||||
Since = since,
|
Since = since.HasValue ? ((DateTime)since).ToUniversalTime() : since,
|
||||||
Count = count,
|
Count = count,
|
||||||
Offset = offset
|
Offset = offset
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ namespace PocketSharp
|
|||||||
/// <exception cref="PocketException"></exception>
|
/// <exception cref="PocketException"></exception>
|
||||||
Task<bool> RenameTag(PocketItem item, string oldTag, string newTag, CancellationToken cancellationToken = default(CancellationToken));
|
Task<bool> RenameTag(PocketItem item, string oldTag, string newTag, CancellationToken cancellationToken = default(CancellationToken));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region statistics methods
|
#region statistics methods
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Statistics from the user account.
|
/// Statistics from the user account.
|
||||||
|
|||||||
@@ -338,6 +338,11 @@ namespace PocketSharp
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal async Task<bool> Send(IEnumerable<PocketAction> actionParameters, CancellationToken cancellationToken)
|
internal async Task<bool> Send(IEnumerable<PocketAction> actionParameters, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
foreach (PocketAction action in actionParameters)
|
||||||
|
{
|
||||||
|
action.Time = action.Time.HasValue ? ((DateTime)action.Time).ToUniversalTime() : action.Time;
|
||||||
|
}
|
||||||
|
|
||||||
Dictionary<string, string> parameters = new Dictionary<string, string>() {{
|
Dictionary<string, string> parameters = new Dictionary<string, string>() {{
|
||||||
"actions", JsonConvert.SerializeObject(actionParameters.Select(action => action.Convert()))
|
"actions", JsonConvert.SerializeObject(actionParameters.Select(action => action.Convert()))
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
<NuGetPackageImportStamp>10f8a946</NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>6edaee97</NuGetPackageImportStamp>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -57,7 +57,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- A reference to the entire .NET Framework is automatically included -->
|
<!-- A reference to the entire .NET Framework is automatically included -->
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -99,20 +98,20 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\portable-net40+sl5+wp80+win8+monotouch+monoandroid\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PropertyChanged">
|
<Reference Include="PropertyChanged">
|
||||||
<HintPath>..\packages\PropertyChanged.Fody.1.48.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll</HintPath>
|
<HintPath>..\packages\PropertyChanged.Fody.1.48.3\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http">
|
<Reference Include="System.Net.Http">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Extensions">
|
<Reference Include="System.Net.Http.Extensions">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Primitives">
|
<Reference Include="System.Net.Http.Primitives">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -137,14 +136,14 @@
|
|||||||
<ErrorText>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}.</ErrorText>
|
<ErrorText>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}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\Fody.1.22.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.22.1\build\Fody.targets'))" />
|
<Error Condition="!Exists('..\packages\Fody.1.25.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.25.0\build\Fody.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\Fody.1.22.1\build\Fody.targets" Condition="Exists('..\packages\Fody.1.22.1\build\Fody.targets')" />
|
|
||||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="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=317567." HelpKeyword="BCLBUILD2001" />
|
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="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=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Import Project="..\packages\Fody.1.25.0\build\Fody.targets" Condition="Exists('..\packages\Fody.1.25.0\build\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">
|
||||||
|
|||||||
@@ -22,5 +22,5 @@
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("4.1.5.3")]
|
[assembly: AssemblyVersion("4.1.6.1")]
|
||||||
[assembly: AssemblyFileVersion("4.1.5.3")]
|
[assembly: AssemblyFileVersion("4.1.6.1")]
|
||||||
@@ -32,11 +32,11 @@ namespace PocketSharp
|
|||||||
{
|
{
|
||||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||||
{
|
{
|
||||||
DateTime date = (DateTime)value;
|
DateTime date = ((DateTime)value).ToUniversalTime();
|
||||||
DateTime epoc = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
DateTime epoc = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||||
var delta = date - epoc;
|
var delta = date.Subtract(epoc);
|
||||||
|
|
||||||
writer.WriteValue((long)delta.TotalSeconds);
|
writer.WriteValue((int)Math.Truncate(delta.TotalSeconds));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||||
@@ -191,7 +191,7 @@ namespace PocketSharp
|
|||||||
var jObject = JObject.ReadFrom(reader);
|
var jObject = JObject.ReadFrom(reader);
|
||||||
var pocketItem = new PocketItem();
|
var pocketItem = new PocketItem();
|
||||||
serializer.Populate(jObject.CreateReader(), pocketItem);
|
serializer.Populate(jObject.CreateReader(), pocketItem);
|
||||||
pocketItem.Json = jObject.ToString();
|
//pocketItem.Json = jObject.ToString();
|
||||||
|
|
||||||
return pocketItem;
|
return pocketItem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.6.7.0" newVersion="2.6.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.6.7.0" newVersion="2.6.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Fody" version="1.22.1" targetFramework="portable-net403+sl50+win+wp80" developmentDependency="true" />
|
<package id="Fody" version="1.25.0" targetFramework="portable-net45+win+wpa81+wp80" developmentDependency="true" />
|
||||||
<package id="Microsoft.Bcl" version="1.1.7" targetFramework="portable-net403+sl50+win+wpa81+wp80" requireReinstallation="True" />
|
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="portable-net45+win+wpa81+wp80" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="portable-net403+sl50+win+wpa81+wp80" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="portable-net403+sl50+win+wpa81+wp80" />
|
||||||
<package id="Microsoft.Net.Http" version="2.2.19" targetFramework="portable-net403+sl50+win+wpa81+wp80" />
|
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="portable-net45+win+wpa81+wp80" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="portable-net403+sl50+win+wp80" requireReinstallation="True" />
|
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="portable-net45+win+wpa81+wp80" />
|
||||||
<package id="PropertyChanged.Fody" version="1.48.0.0" targetFramework="portable-net403+sl50+win+wp80" developmentDependency="true" requireReinstallation="True" />
|
<package id="PropertyChanged.Fody" version="1.48.3" targetFramework="portable-net45+win+wpa81+wp80" developmentDependency="true" />
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user