Example #1
0
 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));
 }
Example #2
0
        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));
        }