Members now appearing on host

This commit is contained in:
watsonb8
2019-07-05 17:37:10 -04:00
parent b18abf0400
commit 0d64c0732e
7 changed files with 61 additions and 35 deletions

View File

@ -1,6 +1,8 @@
using System;
using System.Reflection;
using System.Linq;
using System.Collections.ObjectModel;
using Aurora.Models;
namespace Aurora.Executors
{
@ -12,6 +14,8 @@ namespace Aurora.Executors
public Type ExecutorType { get; protected set; }
public abstract ObservableCollection<PartyMember> PartyMembers { get; }
public static BaseExecutor CreateExecutor<T>()
{
@ -40,7 +44,7 @@ namespace Aurora.Executors
public abstract void Close();
public abstract void GetMembers();
public abstract ObservableCollection<PartyMember> GetMembers();
public abstract void GetQueue();

View File

@ -1,4 +1,6 @@
using System;
using System.Collections.ObjectModel;
using Aurora.Models;
using Aurora.Executors;
namespace Aurora.Executors
@ -10,6 +12,14 @@ namespace Aurora.Executors
}
#region Properties
public override ObservableCollection<PartyMember> PartyMembers
{
get { return null; }
}
#endregion Properties
public override void AddToQueue()
{
throw new NotImplementedException();
@ -20,7 +30,7 @@ namespace Aurora.Executors
throw new NotImplementedException();
}
public override void GetMembers()
public override ObservableCollection<PartyMember> GetMembers()
{
throw new NotImplementedException();
}

View File

@ -1,5 +1,7 @@
using System;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using Aurora.Models;
using Aurora.Executors;
using Aurora.Services;
using Aurora.Proto;
@ -9,21 +11,29 @@ namespace Aurora.Executors
{
public class HostExecutor : BaseExecutor
{
RemotePartyServiceImpl _remoteServiceImpl;
RemotePartyServiceImpl _remotePartyServiceImpl;
RemotePlaybackServiceImpl _remotePlaybackImpl;
public HostExecutor()
{
_remoteServiceImpl = new RemotePartyServiceImpl();
_remotePartyServiceImpl = new RemotePartyServiceImpl();
_remotePlaybackImpl = new RemotePlaybackServiceImpl();
}
public override void Initialize()
{
//Register grpc RemoteService with singleton server service
ServerService.Instance.RegisterService(RemotePartyService.BindService(_remoteServiceImpl));
ServerService.Instance.RegisterService(RemotePartyService.BindService(_remotePartyServiceImpl));
ServerService.Instance.RegisterService(RemotePlaybackService.BindService(_remotePlaybackImpl));
}
#region Properties
public override ObservableCollection<PartyMember> PartyMembers
{
get { return _remotePartyServiceImpl.PartyMembers; }
}
#endregion Properties
public override async void Close()
{
await ServerService.Instance.Stop();
@ -34,7 +44,7 @@ namespace Aurora.Executors
throw new NotImplementedException();
}
public override void GetMembers()
public override ObservableCollection<PartyMember> GetMembers()
{
throw new NotImplementedException();
}