Skip to content

Commit

Permalink
Customized the assembly version to address #1415
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed May 6, 2020
1 parent 822380b commit 9074a81
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 36 deletions.
71 changes: 39 additions & 32 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
<Project>
<PropertyGroup>
<PackageReleaseNotes>For full release notes see https://github.com/restsharp/RestSharp/blob/master/releasenotes.md</PackageReleaseNotes>
<PackageIcon>restsharp.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>http://restsharp.org</PackageProjectUrl>
<RepositoryUrl>https://github.com/restsharp/RestSharp.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>Simple REST and HTTP API Client</Description>
<Authors>John Sheehan, Andrew Young, Alexey Zimarev and RestSharp community</Authors>
<Version>106.8.10</Version>
<Optimize>true</Optimize>
<AssemblyOriginatorKeyFile>..\..\RestSharp.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<UpdateVersionProperties>true</UpdateVersionProperties>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<LangVersion>8</LangVersion>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\restsharp.png" Pack="true" PackagePath="\"/>
</ItemGroup>
<PropertyGroup>
<PackageReleaseNotes>For full release notes see https://github.com/restsharp/RestSharp/blob/master/releasenotes.md</PackageReleaseNotes>
<PackageIcon>restsharp.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>http://restsharp.org</PackageProjectUrl>
<RepositoryUrl>https://github.com/restsharp/RestSharp.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>Simple REST and HTTP API Client</Description>
<Authors>John Sheehan, Andrew Young, Alexey Zimarev and RestSharp community</Authors>
<Version>106.8.10</Version>
<Optimize>true</Optimize>
<AssemblyOriginatorKeyFile>..\..\RestSharp.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<UpdateVersionProperties>true</UpdateVersionProperties>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<LangVersion>8</LangVersion>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="MinVer" Version="2.2.0" PrivateAssets="All"/>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0"/>
</ItemGroup>

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

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

<Target Name="CustomVersion" AfterTargets="MinVer">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</FileVersion>
<AssemblyVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</AssemblyVersion>
</PropertyGroup>
</Target>
</Project>
10 changes: 6 additions & 4 deletions src/RestSharp/IRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,26 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using JetBrains.Annotations;
using RestSharp.Authenticators;
using RestSharp.Deserializers;
using RestSharp.Serialization;

namespace RestSharp
{
[PublicAPI]
public partial interface IRestClient
{
/// <summary>
/// The UseSerializer method.
/// Replace the default serializer with a custom one
/// </summary>
/// <param name="serializerFactory">The serializer factory</param>
/// <param name="serializerFactory">Function that returns the serializer instance</param>
IRestClient UseSerializer(Func<IRestSerializer> serializerFactory);

/// <summary>
/// Replace the default serializer with a custom one
/// Replace the default serializer with a custom one
/// </summary>
/// <typeparam name="T">The type that implements IRestSerializer</typeparam>
/// <typeparam name="T">The type that implements <see cref="IRestSerializer"/></typeparam>
/// <returns></returns>
IRestClient UseSerializer<T>() where T : IRestSerializer, new();

Expand Down

0 comments on commit 9074a81

Please sign in to comment.