2025-02-17 23:19:54 +03:00
|
|
|
using System.Text.Json.Serialization;
|
2025-02-18 22:49:59 +03:00
|
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
|
|
|
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
2025-02-17 23:19:54 +03:00
|
|
|
|
|
|
|
|
namespace mROA.Implementation;
|
2025-01-11 22:44:29 +03:00
|
|
|
|
|
|
|
|
public interface ICallRequest
|
|
|
|
|
{
|
2025-02-18 14:11:28 +03:00
|
|
|
Guid Id { get; }
|
2025-01-12 22:44:52 +03:00
|
|
|
int CommandId { get; }
|
2025-01-13 15:03:03 +03:00
|
|
|
int ObjectId { get; }
|
2025-02-07 16:53:12 +03:00
|
|
|
object? Parameter { get; }
|
2025-01-11 22:44:29 +03:00
|
|
|
}
|
|
|
|
|
|
2025-02-04 23:19:24 +03:00
|
|
|
public class DefaultCallRequest : ICallRequest
|
2025-01-13 15:03:03 +03:00
|
|
|
{
|
2025-02-18 14:11:28 +03:00
|
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
2025-02-07 16:53:12 +03:00
|
|
|
public int CommandId { get; init; }
|
|
|
|
|
public int ObjectId { get; init; } = -1;
|
2025-02-17 16:52:58 +03:00
|
|
|
|
2025-02-17 23:19:54 +03:00
|
|
|
[JsonIgnore]
|
|
|
|
|
public Type? ParameterType { get; init; }
|
2025-01-15 10:14:21 +03:00
|
|
|
public object? Parameter { get; set; }
|
2025-02-17 16:52:58 +03:00
|
|
|
}
|