Skip to content

Instantly share code, notes, and snippets.

@alistairjevans

alistairjevans/FeedHub.cs

Last active Jun 8, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.