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)); }
public CorrespondenceFact CreateFact(FactMemento memento) { VideoSwitch newFact = new VideoSwitch(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; }
// Fields // Results // Business constructor public VideoSwitch__selection( VideoSwitch videoSwitch ,IEnumerable<VideoSwitch__selection> prior ,RequestRoute value ) { InitializeResults(); _videoSwitch = new PredecessorObj<VideoSwitch>(this, GetRoleVideoSwitch(), videoSwitch); _prior = new PredecessorList<VideoSwitch__selection>(this, GetRolePrior(), prior); _value = new PredecessorObj<RequestRoute>(this, GetRoleValue(), value); }
// Business constructor public RequestRoute( VideoSwitch videoSwitch ,IEnumerable<RequestRoute> prior ,int fromChannel ,int toChannel ) { InitializeResults(); _videoSwitch = new PredecessorObj<VideoSwitch>(this, GetRoleVideoSwitch(), videoSwitch); _prior = new PredecessorList<RequestRoute>(this, GetRolePrior(), prior); _fromChannel = fromChannel; _toChannel = toChannel; }