コード例 #1
0
        public void Save(SurveyState state)
        {
            FileStream      stream    = new FileStream(fileName, FileMode.Create);
            BinaryFormatter formatter = new BinaryFormatter();

            formatter.Serialize(stream, state);
            stream.Close();
        }
コード例 #2
0
 public void RestoreSnapshot(SurveySnapshot snapshot)
 {
     this.state = snapshot.Restore();
 }
コード例 #3
0
 public Survey(SurveyState state)
 {
     this.state = state;
 }