/// <summary> /// Reads the data. /// </summary> /// <param name="reader">The reader.</param> public override void ReadData(System.IO.BinaryReader reader) { base.ReadData(reader); /*read extended values */ int sourceAnswers_Count = reader.ReadInt32(); for (int i = 0; i < sourceAnswers_Count; i++) { string sourceId = reader.ReadString(); sourceSatisfactionState sourceSatisfaction = (sourceSatisfactionState)reader.ReadInt32(); sourceAnswers.Add(sourceId, sourceSatisfaction); } int linkDecisions_Count = reader.ReadInt32(); for (int i = 0; i < linkDecisions_Count; i++) { String sourceArtifactId = reader.ReadString(); Dictionary <string, linkStates> linkForSourceDictionary = new Dictionary <string, linkStates>(); int linkForSource_Count = reader.ReadInt32(); for (int j = 0; j < linkForSource_Count; j++) { string targetArtifactId = reader.ReadString(); linkStates linkStateDecision = (linkStates)reader.ReadInt32(); linkForSourceDictionary.Add(targetArtifactId, linkStateDecision); } linkDecisions.Add(sourceArtifactId, linkForSourceDictionary); } }
public void setSourceSatisfactionDecision(String sourceId, sourceSatisfactionState newState) { sourceAnswers[sourceId] = newState; }