Skip to content

Commit

Permalink
add baseAddress ctor overload
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Aug 9, 2024
1 parent 5daba54 commit 5815634
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion DragonFruit.Data/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ namespace DragonFruit.Data
/// Represents a strongly-typed serializer version of <see cref="ApiClient"/>
/// </summary>
/// <typeparam name="T">The type of the <see cref="ApiSerializer"/></typeparam>
public class ApiClient<T>() : ApiClient(new T()) where T : ApiSerializer, new();
public class ApiClient<T> : ApiClient where T : ApiSerializer, new()
{
public ApiClient()
: base(new T())
{
}

public ApiClient(Uri baseAddress)
: base(new T(), baseAddress)
{
}
}

/// <summary>
/// The <see cref="ApiClient"/> responsible for building, submitting and processing HTTP requests
Expand Down

0 comments on commit 5815634

Please sign in to comment.