public CorrespondenceFact CreateFact(FactMemento memento) { RatingQuestion newFact = new RatingQuestion(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 SessionEvaluationRating( SessionEvaluation evaluation ,RatingQuestion question ) { InitializeResults(); _evaluation = new PredecessorObj<SessionEvaluation>(this, GetRoleEvaluation(), evaluation); _question = new PredecessorObj<RatingQuestion>(this, GetRoleQuestion(), question); }
public SessionEvaluationRating Rating(RatingQuestion question) { return Community.AddFact(new SessionEvaluationRating(this, question)); }