2021-04-12 20:58:44 -04:00

33 lines
1.0 KiB
C#

using System;
using System.Threading.Tasks;
using Aurora.Utils;
using Aurora.Proto.Party;
using Google.Protobuf.WellKnownTypes;
namespace Aurora.Services.Controllers
{
public partial class RemotePartyController : RemotePartyService.RemotePartyServiceBase
{
private string _partyResourceName = "party/party1";
private string _displayName;
private string _description;
private Member _hostMember;
private DateTime _startDateTime;
public override Task<Party> GetParty(Proto.General.Empty request, Grpc.Core.ServerCallContext context)
{
Party party = new Party()
{
Name = _partyResourceName,
DisplayName = this._displayName,
Description = this._description,
HostIp = IpUtil.GetLocalIPAddress(),
HostMember = this._hostMember,
CreatedOn = Timestamp.FromDateTime(_startDateTime)
};
return Task.FromResult(party);
}
}
}