public void Save(SurveyState state) { FileStream stream = new FileStream(fileName, FileMode.Create); BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, state); stream.Close(); }
public void RestoreSnapshot(SurveySnapshot snapshot) { this.state = snapshot.Restore(); }
public Survey(SurveyState state) { this.state = state; }