Skip to content

Instantly share code, notes, and snippets.

@alistairjevans
Last active June 8, 2019 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alistairjevans/d1d6fdb451d056af714e59fe85522867 to your computer and use it in GitHub Desktop.
Save alistairjevans/d1d6fdb451d056af714e59fe85522867 to your computer and use it in GitHub Desktop.
New hub
public class FeedHub : Hub
{
private readonly IMachineState machineState;
private readonly ISampleWriter sampleWriter;
public FeedHub(IMachineState machineState, ISampleWriter sampleWriter)
{
this.machineState = machineState;
this.sampleWriter = sampleWriter;
}
public void ResetCount()
{
// Reset the state, and start a new data file
machineState.ZeroCount();
sampleWriter.StartNewFile();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment