diff --git a/DragonFruit.Common.Data/TargetTypedApiClient.cs b/DragonFruit.Common.Data/TargetTypedApiClient.cs new file mode 100644 index 0000000..acefaa8 --- /dev/null +++ b/DragonFruit.Common.Data/TargetTypedApiClient.cs @@ -0,0 +1,24 @@ +// DragonFruit.Common Copyright 2021 DragonFruit Network +// Licensed under the MIT License. Please refer to the LICENSE file at the root of this project for details + +using System; +using DragonFruit.Common.Data.Serializers; + +namespace DragonFruit.Common.Data +{ + /// + /// A superclass designed to allow better serializer configuration + /// + /// The to use + public class ApiClient : ApiClient where T : ApiSerializer, new() + { + public ApiClient(Action configurationOptions = null) + : base(Activator.CreateInstance()) + { + if (configurationOptions != null) + { + Serializer.Configure(configurationOptions); + } + } + } +}