Ejemplo n.º 1
0
 // Business constructor
 public Account(
     Company company
     ,int type
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _type = type;
 }
Ejemplo n.º 2
0
 // Results
 // Business constructor
 public Year(
     Company company
     ,int calendarYear
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _calendarYear = calendarYear;
 }
Ejemplo n.º 3
0
 // Results
 // Business constructor
 public Company__name(
     Company company
     ,IEnumerable<Company__name> prior
     ,string value
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _prior = new PredecessorList<Company__name>(this, GetRolePrior(), prior);
     _value = value;
 }
Ejemplo n.º 4
0
 // Fields
 // Results
 // Business constructor
 public Share(
     Identity identity
     ,Company company
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _identity = new PredecessorObj<Identity>(this, GetRoleIdentity(), identity);
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
 }
Ejemplo n.º 5
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                Company newFact = new Company(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);
                    }
                }

                return newFact;
            }