public void UpdateStatus(MicropartType micropartType, Action <MicropartStatusInfo> statusUpdateAction) { var micropartStatusName = _micropartMetadata[micropartType]; var microServiceComponentStatus = Get(micropartStatusName); statusUpdateAction(microServiceComponentStatus); }
private void UpdateStatus(MicropartType micropartType, IMicroPartInfo microParInfo) { UpdateStatus(micropartType, micropartStatusInfo => { micropartStatusInfo.MicroPartInstanceName = microParInfo.MicroServicePartName; micropartStatusInfo.IsEnabled = microParInfo.IsEnabled; }); }
public IMicroPartInfo UpdateStatus <T>(MicropartType micropartType) where T : class, IMicroPartInfo { var micropartInfo = _microServiceParts.FirstOfType <T>(); UpdateStatus(micropartType, micropartStatusInfo => { micropartStatusInfo.MicroPartInstanceName = micropartInfo.MicroServicePartName; micropartStatusInfo.IsEnabled = micropartInfo.IsEnabled; }); return(micropartInfo); }