public async Task ApplyReferenceEntityHeader(String propName, StringBuilder bldr, String indent, EntityHeader eh, Object model = null) { switch (propName) { case nameof(Verifier.Component): var msg = await _deviceMsgMgr.GetDeviceMessageDefinitionAsync(eh.Id, _org, _user); var verifier = model as Verifier; bldr.AppendLine($"{indent} type: {propName}"); bldr.AppendLine($"{indent} name: {msg.Name}"); bldr.AppendLine($"{indent} subType: {verifier.VerifierType}"); bldr.AppendLine($"{indent} key: {msg.Key}"); break; case "Listeners": var listener = await _pipelineMgr.GetListenerConfigurationAsync(eh.Id, _org, _user); bldr.AppendLine($"{indent} type: Listener"); bldr.AppendLine($"{indent} name: {listener.Name}"); bldr.AppendLine($"{indent} key: {listener.Key}"); break; case nameof(DeviceType.DefaultDeviceConfiguration): case "DeviceConfigurations": var config = await _deviceCfgMgr.GetDeviceConfigurationAsync(eh.Id, _org, _user); bldr.AppendLine($"{indent} type: DeviceConfiguration"); bldr.AppendLine($"{indent} name: {config.Name}"); bldr.AppendLine($"{indent} key: {config.Key}"); break; case "Planner": var planner = await _pipelineMgr.GetPlannerConfigurationAsync(eh.Id, _org, _user); bldr.AppendLine($"{indent} type: Planner"); bldr.AppendLine($"{indent} name: {planner.Name}"); bldr.AppendLine($"{indent} key: {planner.Key}"); break; default: bldr.AppendLine($"{indent} Don't know how to process {propName}"); break; } }
public async Task <DetailResponse <PlannerConfiguration> > GetPlannerConfigurationAsync(String id) { var config = await _pipelineModuleManager.GetPlannerConfigurationAsync(id, OrgEntityHeader, UserEntityHeader); return(DetailResponse <PlannerConfiguration> .Create(config)); }