Ejemplo n.º 1
0
 // Business constructor
 public VideoSwitch(
     Company company
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _company = new PredecessorObj<Company>(this, GetRoleCompany(), company);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
            }