using System; using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Text.Json; using Props.Shop.Framework; namespace Props.Shop.Ebay { public class EbayShop : IShop { private bool disposedValue; public string ShopName => "Ebay"; public string ShopDescription => "A multi-national online store host to consumer-to-consumer and business-to-consumer sales."; public string ShopModuleAuthor => "Reslate"; public SupportedFeatures SupportedFeatures => new SupportedFeatures( true, true, true, true, true ); Configuration configuration; private HttpClient httpClient; public IEnumerable Initialize(byte[] data) { httpClient = new HttpClient(); configuration = JsonSerializer.Deserialize(data); return new List() { new SandboxOption(configuration), }; } protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { httpClient.Dispose(); } disposedValue = true; } } public void Dispose() { Dispose(disposing: true); GC.SuppressFinalize(this); } public byte[] GetDataForPersistence() { return JsonSerializer.SerializeToUtf8Bytes(configuration); } public IAsyncEnumerable Search(string query, Filters filters) { // TODO: Implement the search system. throw new NotImplementedException(); } } }