Ejemplo n.º 1
0
 public MainViewModel(Community community, Individual individual, Company company, ActivitySelection activitySelection)
 {
     _community = community;
     _individual = individual;
     _company = company;
     _activitySelection = activitySelection;
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public CategoryGenerator(Community community, Company company, Quarter quarter)
 {
     _community = community;
     _company = company;
     _quarter = quarter;
 }
Ejemplo n.º 4
0
 // Business constructor
 public Quarter(
     Company company
     ,DateTime startDate
     )
 {
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
     _startDate = startDate;
 }
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._identifier = (string)_fieldSerializerByType[typeof(string)].ReadData(output);
                    }
                }

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