//---- protected override CommonRfcommStream GetNewPort() { var set = _portSettings.Dequeue(); var command = new LsnrCommands(); switch (set) { case LsnrSetting.None: break; case LsnrSetting.ErrorOnOpenServer: command.NextOpenServerShouldFail = true; break; case LsnrSetting.ConnectsImmediately: command.NextPortShouldConnectImmediately = true; break; case LsnrSetting.ErrorConnectsImmediately: throw new NotImplementedException(); // break; default: throw new ArgumentException("Unknown LsnrSetting value: " + set); } return(new NullRfcommStream(command)); }
public LsnrCommands Clone() { var copy = new LsnrCommands { NextPortShouldConnectImmediately = this.NextPortShouldConnectImmediately, NextOpenServerShouldFail = this.NextOpenServerShouldFail }; return(copy); }
internal NullRfcommStream(LsnrCommands cmds) { _cmds = cmds; }