public MainViewModel(Community community, Individual individual, Company company, ActivitySelection activitySelection)
 {
     _community = community;
     _individual = individual;
     _company = company;
     _activitySelection = activitySelection;
 }
        public async Task Initialize()
        {
            _community = new Community(new MemoryStorageStrategy())
                .Register<CorrespondenceModel>();

            _company = await _community.AddFactAsync(new Company("improvingEnterprises"));
            _quarter = await _community.AddFactAsync(new Quarter(_company, new DateTime(2013, 1, 1)));
            _categoryGenerator = new CategoryGenerator(_community, _company, _quarter);
            await _categoryGenerator.GenerateAsync();
        }
 public CategoryGenerator(Community community, Company company, Quarter quarter)
 {
     _community = community;
     _company = company;
     _quarter = quarter;
 }
 // Business constructor
 public Quarter(
     Company company
     ,DateTime startDate
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _startDate = startDate;
 }
            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._identifier = (string)_fieldSerializerByType[typeof(string)].ReadData(output);
                    }
                }

                return newFact;
            }
 // Business constructor
 public Category(
     Company company
     ,string identifier
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _identifier = identifier;
 }