Exemplo n.º 1
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                Offer newFact = new Offer(memento);

                // Create a memory stream from the memento data.
                using (MemoryStream data = new MemoryStream(memento.Data))
                {
                    using (BinaryReader output = new BinaryReader(data))
                    {
                        newFact._chances = (int)_fieldSerializerByType[typeof(int)].ReadData(output);
                    }
                }

                return newFact;
            }
Exemplo n.º 2
0
 // Fields
 // Results
 // Business constructor
 public Hire(
     Offer offer
     )
 {
     InitializeResults();
     _offer = new PredecessorObj<Offer>(this, RoleOffer, offer);
 }