Example #1
0
 // Business constructor
 public Account(
     Company company
     ,int type
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _type = type;
 }
Example #2
0
 // Results
 // Business constructor
 public Year(
     Company company
     ,int calendarYear
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _calendarYear = calendarYear;
 }
Example #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;
 }
Example #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);
 }
Example #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;
            }