private void Initialize(string name, int listenPort, CommunicationTypes communicationType)
{
this.name = name;
this.clientInstances = new Dictionary<string, MonoExpanderInstance>();
this.typeCache = new Dictionary<string, Type>();
switch (communicationType)
{
case CommunicationTypes.SignalR:
this.serverCommunication = new ExpanderCommunication.SignalRServer(
listenPort: listenPort,
dataReceivedAction: DataReceived);
break;
case CommunicationTypes.Netty:
this.serverCommunication = new ExpanderCommunication.NettyServer(
listenPort: listenPort,
dataReceivedAction: DataReceived,
clientConnectedAction: ClientConnected);
break;
default:
throw new ArgumentException("Communication Type");
}
Executor.Current.Register(this);
}