// Business constructor public Book( Account account ,Year year ) { InitializeResults(); _account = new PredecessorObj<Account>(this, GetRoleAccount(), account); _year = new PredecessorObj<Year>(this, GetRoleYear(), year); }
public CorrespondenceFact CreateFact(FactMemento memento) { Year newFact = new Year(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._calendarYear = (int)_fieldSerializerByType[typeof(int)].ReadData(output); } } return newFact; }