namespace NetinaShop.AdminPanel.PWA.Services.RestServices; public class RestWrapper : IRestWrapper { private static RefitSettings setting = new RefitSettings(new NewtonsoftJsonContentSerializer(new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore, })); public ICrudApiRest CrudApiRest(string address) where T : class { return RestService.For>(address, setting); } public ICrudDtoApiRest CrudDtoApiRest(string address) where T : class where TDto : class { return RestService.For>(address, setting); } public IAuthRestApi AuthRestApi => RestService.For(Address.AuthController, setting); public IUserRestApi UserRestApi => RestService.For(Address.UserController, setting); public IProductCategoryRestApi ProductCategoryRestApi => RestService.For(Address.ProductCategoryController, setting); public IProductRestApi ProductRestApi => RestService.For(Address.ProductController, setting); public IBrandRestApi BrandRestApi => RestService.For(Address.BrandController, setting); public IFileRestApi FileRestApi => RestService.For(Address.FileController, setting); public IBlogRestApi BlogRestApi => RestService.For(Address.BlogController, setting); public IDiscountRestApi DiscountRest => RestService.For(Address.DiscountController, setting); public IBlogCategoryRestApi BlogCategoryRestApi => RestService.For(Address.BlogCategoryController, setting); public IRoleRestApi RoleRestApi => RestService.For(Address.RoleController); }