Files
mROA/mROA/Implementation/CallRequest.cs
T

41 lines
1.0 KiB
C#
Raw Normal View History

2025-01-11 22:44:29 +03:00
namespace mROA.Implementation;
public interface ICallRequest
{
int CommandId { get; }
int ClientId { get; }
2025-01-13 15:03:03 +03:00
int ObjectId { get; }
object Parameter { get; }
2025-01-11 22:44:29 +03:00
}
2025-01-13 15:03:03 +03:00
public class JsonCallRequest : ICallRequest
{
public int CommandId { get; set; }
public int ClientId { get; set; }
public int ObjectId { get; set; } = -1;
public object Parameter { get; set; }
}
public struct HardCallRequest : ICallRequest
2025-01-11 22:44:29 +03:00
{
public int CommandId => Command;
public int ClientId => Client;
public int ObjectId => Object;
public int Command;
public int Client;
public int Object;
2025-01-11 22:44:29 +03:00
public object Parameter { get; set; }
2025-01-11 22:44:29 +03:00
}
// public class CallRequest : SingletonCallRequest
// {
// public override int RequestTypeId => (int)RequestType.NonParametrized;
// public int ObjectId { get; set; }
// }
//
// public class ParametrizedCallRequest : CallRequest
// {
// public override int RequestTypeId => (int)RequestType.Parametrized;
// public object Parameter { get; set; }
// }
2025-01-11 22:44:29 +03:00