rama creada apartir de master en j
This commit is contained in:
@@ -6,6 +6,9 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace adas_core.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an API request, encapsulating the data and configuration needed to invoke a remote or web service endpoint.
|
||||
/// </summary>
|
||||
public class ApiRequest
|
||||
{
|
||||
// SIU
|
||||
@@ -104,15 +107,20 @@ public class ApiRequest
|
||||
|
||||
public bool RequestFromPanel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a JSON string representation of the current object using <see cref="JsonConvert.SerializeObject(object, Formatting)"/> with no formatting.
|
||||
/// If serialization fails, falls back to the result of <see cref="object.ToString()"/>.
|
||||
/// </summary>
|
||||
/// <returns>A JSON string representation of the object, or the base <see cref="object.ToString()"/> result if serialization throws an exception.</returns>
|
||||
public override string? ToString()
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.None);
|
||||
try
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.None);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user