2020-01-20 21:55:12 +00:00
|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Collections.Generic;
|
2020-02-02 21:49:01 +00:00
|
|
|
using Aurora.Proto.Party;
|
2020-01-20 21:55:12 +00:00
|
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Aurora.Services.Server.Controllers
|
|
|
|
{
|
|
|
|
public partial class RemotePartyController : RemotePartyService.RemotePartyServiceBase
|
|
|
|
{
|
2020-01-21 03:53:33 +00:00
|
|
|
private string _partyResourceName = "party/party1";
|
2020-01-20 21:55:12 +00:00
|
|
|
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()
|
|
|
|
{
|
2020-01-21 03:53:33 +00:00
|
|
|
Name = _partyResourceName,
|
2020-01-20 21:55:12 +00:00
|
|
|
DisplayName = this._displayName,
|
|
|
|
Description = this._description,
|
|
|
|
HostIp = ServerService.GetLocalIPAddress(),
|
|
|
|
HostMember = this._hostMember,
|
|
|
|
CreatedOn = Timestamp.FromDateTime(_startDateTime)
|
|
|
|
};
|
|
|
|
|
|
|
|
return Task.FromResult(party);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|