private AdvancedProtocol createAdvancedProtocol(ApplicationType applicationType) { var protocol = _objectBaseFactory.Create <AdvancedProtocol>(); protocol.Root = _objectBaseFactory.Create <IRootContainer>(); protocol.TimeUnit = _displayUnitRetriever.PreferredUnitFor(_dimensionRepository.Time); var schema = _schemaFactory.CreateWithDefaultItem(applicationType, protocol); protocol.AddSchema(schema); return(protocol); }
public IPKSimCommand AddSchemaTo(AdvancedProtocol protocol) { var newSchema = _schemaFactory.CreateWithDefaultItem(ApplicationTypes.IntravenousBolus, protocol); return(new AddSchemaToProtocolCommand(newSchema, protocol, _executionContext).Run(_executionContext)); }