public CorrespondenceFact CreateFact(FactMemento memento) { EssayQuestion newFact = new EssayQuestion(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._text = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return newFact; }
// Business constructor public SessionEvaluationEssay( SessionEvaluation evaluation ,EssayQuestion question ) { InitializeResults(); _evaluation = new PredecessorObj<SessionEvaluation>(this, GetRoleEvaluation(), evaluation); _question = new PredecessorObj<EssayQuestion>(this, GetRoleQuestion(), question); }
public SessionEvaluationEssay Essay(EssayQuestion question) { return Community.AddFact(new SessionEvaluationEssay(this, question)); }