mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
24 lines
552 B
C#
24 lines
552 B
C#
using ColorControl.Shared.Common;
|
|
using ColorControl.Shared.Contracts;
|
|
|
|
namespace ColorControl.Shared.Services
|
|
{
|
|
public class RpcService
|
|
{
|
|
public string Name { get; set; }
|
|
|
|
public T Call<T>(string method, params object[] arguments) where T : class
|
|
{
|
|
var rpcMessage = new SvcRpcMessage
|
|
{
|
|
ServiceName = Name,
|
|
MethodName = method,
|
|
Arguments = arguments
|
|
};
|
|
|
|
return PipeUtils.SendRpcMessage<T>(rpcMessage);
|
|
}
|
|
|
|
}
|
|
}
|