System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. Path:
// Там где ты регистрируешь сервисы
services
.AddMvcCore() // или .AddMvc()
.AddJsonOptions(options =>
{
options.JsonSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web)
{
ReferenceHandler = ReferenceHandler.IgnoreCycles // или ReferenceHandler.Preserve
};
});
If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. However, you should not rely on this last behavior; for more information, see the Remarks.
The return value is zero for the following cases:
- The current desktop is not the active desktop
- The foreground thread belongs to another process and the desktop does not allow the hook or the journal record.
Стоит отметить, что прога вылетает не просто так, предварительно в правом нижнем углу вылезает защитник Windows и орет, мол эта штука использует какие то там интсрументы
var allPaymentMethods = new List<PaymentMethod>();
StripeList<PaymentMethod> paymentMethodsList;
var options = new PaymentMethodListOptions
{
Customer = "NUM",
Type = "card",
Limit = 100
};
do {
paymentMethodsList = service.List(options)
allPaymentMethods.AddRange(paymentMethodsList);
var lastItem = allPaymentMethods.Last();
options.StartingAfter = lastItem.Id;
} while(paymentMethodsList.HasMore);
base(IBar)
:
Потом как правило объект StringBuilder находиться в методе, и сразу. умирает, то есть он вполне может использовать стек а не кучу
Потом вообще почему любое new String (char[] ) копирует массив? почему не оборачивает