public void Join(string name, string topic, RoomVersion roomVersion) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException(Resources.Client_Join_Cannot_be_empty_or_null, "name"); } if (string.IsNullOrEmpty(topic)) { throw new ArgumentException(Resources.Client_Join_Cannot_be_empty_or_null, "topic"); } if (this._lobby == null) { throw new ApplicationException("Lobby is null"); } ObjectAdapter adapter = this.Communicator.createObjectAdapter(string.Empty); this._jobQueue = new JobQueue(); Listener listener = new ListenerI(this._outputTxtBx, this._jobQueue); ObjectPrx listenerPrx = adapter.addWithUUID(listener); this._jobQueue.Start(); adapter.activate(); this._lobby.ice_getConnection().setAdapter(adapter); this._roomAccess = this._lobby.Join(name, topic, listenerPrx.ice_getIdentity()); this._context = new Dictionary <string, string> { { SESSIONCTXPROP.value, topic }, { AUTHORCTXPROP.value, name } }; }
public void Join(string name, string topic, RoomVersion roomVersion) { if (string.IsNullOrEmpty(name)) throw new ArgumentException(Resources.Client_Join_Cannot_be_empty_or_null, "name"); if (string.IsNullOrEmpty(topic)) throw new ArgumentException(Resources.Client_Join_Cannot_be_empty_or_null, "topic"); if (this._lobby == null) throw new ApplicationException("Lobby is null"); ObjectAdapter adapter = this.Communicator.createObjectAdapter(string.Empty); this._jobQueue = new JobQueue(); Listener listener = new ListenerI(this._outputTxtBx, this._jobQueue); ObjectPrx listenerPrx = adapter.addWithUUID(listener); this._jobQueue.Start(); adapter.activate(); this._lobby.ice_getConnection().setAdapter(adapter); this._roomAccess = this._lobby.Join(name, topic, listenerPrx.ice_getIdentity()); this._context = new Dictionary<string, string> { { SESSIONCTXPROP.value, topic }, {AUTHORCTXPROP.value, name} }; }