Showing 31 of 51 total issues
File VTEXContext.cs
has 1136 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
namespace VTEX
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
Class VTEXContext
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public sealed class VTEXContext : IDisposable
{
#region Private fields
/// <summary>
File VTEXWrapper.cs
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
namespace VTEX
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
Method GetOrderInternal
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private Order GetOrderInternal(string orderId)
{
LogConsumer.Trace("Getting order {0}", orderId);
var json = _wrapper
.ServiceInvokerAsync(
Method ServiceInvokerInternal
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<string> ServiceInvokerInternal(
HttpRequestMethod method,
string endpoint,
CancellationToken token,
string data,
Method GetBridgeItems
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Pure]
public IEnumerable<BridgeItem> GetBridgeItems(
[Localizable(false)] string query,
[Localizable(false)] string sort,
[Localizable(false)] string keywords,
Method GetHostData
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private string GetHostData(
ref string endpoint,
ref Dictionary<string, string> queryString,
RequestEndpoint restEndpoint,
ref Cookie cookie,
Method GetOrdersListInternal
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private OrdersList GetOrdersListInternal(
string status = null,
DateTime? startDate = null,
DateTime? endDate = null,
string salesChannel = null,
Method SearchAsync
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Pure]
public async Task<TDataEntity> SearchAsync<TDataEntity>(
string searchedField,
string searchedValue,
CancellationToken token
Method CancelOrderAsync
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<string> CancelOrderAsync(string orderId)
{
try
{
LogConsumer.Warning("Cancelling order {0}", orderId);
Method RequestInternalAsync
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static async Task<HttpResponseMessage> RequestInternalAsync(
HttpRequestMethod method,
CancellationToken token,
string data,
HttpClient client,
Method UpdateSkuStockAsync
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task UpdateSkuStockAsync(StockInfo stockInfo)
{
try
{
if (stockInfo.Quantity < 0)
Method GetOrderListsValueInternal
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool GetOrderListsValueInternal(
Dictionary<string, string> queryString,
int currentPage,
ref OrdersList result
)
Method HandleException
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private Exception HandleException(
Exception exception,
HttpResponseMessage response,
Uri uri,
HttpRequestMethod method,
Method GetSkuReservationsAsync
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<int> GetSkuReservationsAsync(int skuId, string warehouseId)
{
try
{
LogConsumer.Info(
Method ServiceInvokerAsync
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<string> ServiceInvokerAsync(
HttpRequestMethod method,
[Localizable(false)] string endpoint,
CancellationToken token,
Dictionary<string, string> queryString = null,
Method GetBridgeFacets
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Pure]
public IEnumerable<BridgeFacet> GetBridgeFacets(
[Localizable(false)] string query,
[Localizable(false)] string keywords = null
)
Method NotifyOrderPaidAsync
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task NotifyOrderPaidAsync(string orderId)
{
try
{
LogConsumer.Info("Sending payment notification of order {0}", orderId);
Method ChangeOrderStatusAsync
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task ChangeOrderStatusAsync(string orderId, OrderStatus newStatus)
{
try
{
LogConsumer.Info(
Method NotifyOrderDelivered
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async ValueTask<string> NotifyOrderDelivered(Tracking tracking)
{
try
{
LogConsumer.Info("Sending tracking info of order {0}", tracking.OrderId);