Skip to content

Commit 9074a81

Browse files
committed
Customized the assembly version to address #1415
1 parent 822380b commit 9074a81

File tree

2 files changed

+45
-36
lines changed

2 files changed

+45
-36
lines changed

src/Directory.Build.props

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
<Project>
2-
<PropertyGroup>
3-
<PackageReleaseNotes>For full release notes see https://github.com/restsharp/RestSharp/blob/master/releasenotes.md</PackageReleaseNotes>
4-
<PackageIcon>restsharp.png</PackageIcon>
5-
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
6-
<PackageProjectUrl>http://restsharp.org</PackageProjectUrl>
7-
<RepositoryUrl>https://github.com/restsharp/RestSharp.git</RepositoryUrl>
8-
<RepositoryType>git</RepositoryType>
9-
<Description>Simple REST and HTTP API Client</Description>
10-
<Authors>John Sheehan, Andrew Young, Alexey Zimarev and RestSharp community</Authors>
11-
<Version>106.8.10</Version>
12-
<Optimize>true</Optimize>
13-
<AssemblyOriginatorKeyFile>..\..\RestSharp.snk</AssemblyOriginatorKeyFile>
14-
<SignAssembly>true</SignAssembly>
15-
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
16-
<UpdateVersionProperties>true</UpdateVersionProperties>
17-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
18-
<LangVersion>8</LangVersion>
19-
<IncludeSymbols>true</IncludeSymbols>
20-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
21-
</PropertyGroup>
22-
23-
<ItemGroup>
24-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
25-
<PackageReference Include="MinVer" Version="2.2.0" PrivateAssets="All" />
26-
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
27-
</ItemGroup>
28-
29-
<ItemGroup>
30-
<None Include="..\..\restsharp.png" Pack="true" PackagePath="\"/>
31-
</ItemGroup>
2+
<PropertyGroup>
3+
<PackageReleaseNotes>For full release notes see https://github.com/restsharp/RestSharp/blob/master/releasenotes.md</PackageReleaseNotes>
4+
<PackageIcon>restsharp.png</PackageIcon>
5+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
6+
<PackageProjectUrl>http://restsharp.org</PackageProjectUrl>
7+
<RepositoryUrl>https://github.com/restsharp/RestSharp.git</RepositoryUrl>
8+
<RepositoryType>git</RepositoryType>
9+
<Description>Simple REST and HTTP API Client</Description>
10+
<Authors>John Sheehan, Andrew Young, Alexey Zimarev and RestSharp community</Authors>
11+
<Version>106.8.10</Version>
12+
<Optimize>true</Optimize>
13+
<AssemblyOriginatorKeyFile>..\..\RestSharp.snk</AssemblyOriginatorKeyFile>
14+
<SignAssembly>true</SignAssembly>
15+
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
16+
<UpdateVersionProperties>true</UpdateVersionProperties>
17+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
18+
<LangVersion>8</LangVersion>
19+
<IncludeSymbols>true</IncludeSymbols>
20+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
21+
</PropertyGroup>
22+
23+
<ItemGroup>
24+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
25+
<PackageReference Include="MinVer" Version="2.2.0" PrivateAssets="All"/>
26+
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0"/>
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<None Include="..\..\restsharp.png" Pack="true" PackagePath="\"/>
31+
</ItemGroup>
32+
33+
<PropertyGroup>
34+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
35+
<NoWarn>$(NoWarn);1591</NoWarn>
36+
</PropertyGroup>
3237

38+
<Target Name="CustomVersion" AfterTargets="MinVer">
3339
<PropertyGroup>
34-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
35-
<NoWarn>$(NoWarn);1591</NoWarn>
40+
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</FileVersion>
41+
<AssemblyVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</AssemblyVersion>
3642
</PropertyGroup>
43+
</Target>
3744
</Project>

src/RestSharp/IRestClient.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,26 @@
2121
using System.Text;
2222
using System.Threading;
2323
using System.Threading.Tasks;
24+
using JetBrains.Annotations;
2425
using RestSharp.Authenticators;
2526
using RestSharp.Deserializers;
2627
using RestSharp.Serialization;
2728

2829
namespace RestSharp
2930
{
31+
[PublicAPI]
3032
public partial interface IRestClient
3133
{
3234
/// <summary>
33-
/// The UseSerializer method.
35+
/// Replace the default serializer with a custom one
3436
/// </summary>
35-
/// <param name="serializerFactory">The serializer factory</param>
37+
/// <param name="serializerFactory">Function that returns the serializer instance</param>
3638
IRestClient UseSerializer(Func<IRestSerializer> serializerFactory);
3739

3840
/// <summary>
39-
/// Replace the default serializer with a custom one
41+
/// Replace the default serializer with a custom one
4042
/// </summary>
41-
/// <typeparam name="T">The type that implements IRestSerializer</typeparam>
43+
/// <typeparam name="T">The type that implements <see cref="IRestSerializer"/></typeparam>
4244
/// <returns></returns>
4345
IRestClient UseSerializer<T>() where T : IRestSerializer, new();
4446

0 commit comments

Comments
 (0)