public void Begin() { Settings = EOF.GetSettings(); CommandHandlers = InitializeCommandHandlers(); ch = new SocketHelper(Settings) { OnConnectCallback = OnConnect }; ch.OnReceiveCommandCallback.Add(OnReceiveCommand); }
public void Help_ShowsHelp() { // Arrange string[] args = { "--help" }; var settings = new StubSettings(); // Act parser.Parse(args, settings); var output = outWriter.ToString(); // Assert Assert.Equal(@" Usage: toofz.Services.Tests.dll [options] options: --help Shows usage information. --interval=VALUE The minimum amount of time that should pass between each cycle. --delay=VALUE The amount of time to wait after a cycle to perform garbage collection. --ikey=VALUE An Application Insights instrumentation key. --iterations=VALUE The number of rounds to execute a key derivation function. --connection[=VALUE] The connection string used to connect to the leaderboards database. --optional[=VALUE] This option is optional. ", output, ignoreLineEndingDifferences: true); }
public SocketHelper(StubSettings settings, bool persistent = true) { this.Settings = settings; this.Persistent = persistent; Connect(); }