Animatroller.Framework.Expander.MonoExpanderServer.Initialize C# (CSharp) Method

Initialize() private method

private Initialize ( string name, int listenPort, CommunicationTypes communicationType ) : void
name string
listenPort int
communicationType CommunicationTypes
return void
        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);
        }