Пример #1
0
 // Business constructor
 public VideoSwitch(
     Company company
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
 }
Пример #2
0
 private async Task CreateCompanyAsync()
 {
     _serverCompany = await _server.AddFactAsync(new Company("mycompany"));
     _clientCompany = await _client.AddFactAsync(new Company("mycompany"));
     _serverSwitch = await _server.AddFactAsync(new VideoSwitch(_serverCompany));
 }
Пример #3
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;
            }