public PowerType GetUpdatedPowerType(PowerType.SourceEnum powerSource, PowerType.ServiceEnum powerService, PowerType.ParameterEnum powerParameter) { return(PowerTypes.ToList().Find(powerType => powerType.Source == powerSource && powerType.Service == powerService && powerType.ParameterType == powerParameter)); }
public List <PowerType.ParameterEnum> GetUpdatedPowerParameters(PowerType.SourceEnum powerSource, PowerType.ServiceEnum powerService) { var selectableTypes = PowerTypes.ToList().FindAll(powerType => { return(powerType.Source == powerSource && powerType.Service == powerService); } ); var selectableParameters = selectableTypes.Select(selectableType => selectableType.ParameterType).Distinct(); return(new List <PowerType.ParameterEnum>(selectableParameters)); }