Skip to content

Commit

Permalink
Merge pull request #20 from pimmerks/feature/package-update
Browse files Browse the repository at this point in the history
Feature/package update
  • Loading branch information
pimmerks authored Jan 26, 2019
2 parents 3f6a2df + f240110 commit 1abafa5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,4 @@ __pycache__/
# Custom project ignore
Examples/ExampleNet47/App.config
coverage.json
SpotifyWebApi/FodyWeavers.xsd
9 changes: 6 additions & 3 deletions SpotifyWebApi/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<ConfigureAwait/>
</Weavers>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"
VerifyAssembly="true"
VerifyIgnoreCodes="0x80131869">
<ConfigureAwait />
</Weavers>
6 changes: 3 additions & 3 deletions SpotifyWebApi/Model/Auth/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ public Token()
/// Gets the token generated.
/// </summary>
[JsonProperty("token_generated")]
public DateTime TokenGenerated { get; private set; }
public DateTime TokenGenerated { get; set; } = DateTime.UtcNow;

/// <summary>
/// Gets a value indicating whether this instance is expired.
/// </summary>
[JsonIgnore]
public bool IsExpired => DateTime.Now > this.TokenGenerated.AddSeconds(this.ExpiresIn);
public bool IsExpired => DateTime.UtcNow > this.TokenGenerated.AddSeconds(this.ExpiresIn);

/// <summary>
/// Gets a value indicating wheter this token can be used to access personal data.
Expand Down Expand Up @@ -101,7 +101,7 @@ public static Token Make(
RefreshToken = refreshToken,
Type = tokenType,
ExpiresIn = expiresIn,
TokenGenerated = tokenGenerated ?? DateTime.Now,
TokenGenerated = tokenGenerated ?? DateTime.UtcNow,
Scope = scope ?? string.Empty,
CanAccessPersonalData = canAccessPersonalData,
AuthenticationType = authenticationType
Expand Down
7 changes: 7 additions & 0 deletions SpotifyWebApi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Internals only visible for testing purpose.

using System.Runtime.CompilerServices;
using Fody;

[assembly: InternalsVisibleTo("SpotifyWebApiTest")]
[assembly: ConfigureAwait(false)]
4 changes: 0 additions & 4 deletions SpotifyWebApi/SpotifyWebApi.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Internals only visible for testing purpose.
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("SpotifyWebApiTest")]

namespace SpotifyWebApi
{
using System;
Expand Down
23 changes: 11 additions & 12 deletions SpotifyWebApi/SpotifyWebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Authors>Pim Merks</Authors>
<Company>Pim Merks</Company>
<PackageId>SpotifyWebApi-Core</PackageId>
<Description>A Spotify Web API wrapper.</Description>
<Description>A Spotify Web API wrapper for C#.</Description>
<Copyright>Pim Merks</Copyright>
<RepositoryType>Github</RepositoryType>
<RepositoryUrl>https://github.com/pimmerks/SpotifyWebApi</RepositoryUrl>
Expand All @@ -23,13 +23,21 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\LICENSE" Pack="true" PackagePath=""/>
<None Include="..\LICENSE" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
<PackageReference Include="ConfigureAwait.Fody" Version="2.1.1">
</ItemGroup>

<!-- Development packages -->
<ItemGroup>
<PackageReference Include="Fody" Version="3.3.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="ConfigureAwait.Fody" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
Expand All @@ -43,13 +51,4 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

<!-- Version information will be filled in by a custom CI tool. -->
<PropertyGroup Label="Versioner">
<Version>0.0.0</Version>
<AssemblyVersion>0.0.0</AssemblyVersion>
<FileVersion>0.0.0</FileVersion>
<InformationalVersion>0.0.0</InformationalVersion>
</PropertyGroup>

</Project>

0 comments on commit 1abafa5

Please sign in to comment.