// Results // Business constructor public Bid( Turn turn ,Gig gig ,int chances ) { InitializeResults(); _turn = new PredecessorObj<Turn>(this, RoleTurn, turn); _gig = new PredecessorObj<Gig>(this, RoleGig, gig); _chances = chances; }
public CorrespondenceFact CreateFact(FactMemento memento) { Gig newFact = new Gig(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output); newFact._duration = (int)_fieldSerializerByType[typeof(int)].ReadData(output); newFact._term = (int)_fieldSerializerByType[typeof(int)].ReadData(output); } } return newFact; }