public override Task <int> GetValue(IItemOfValue subject) { if (subject.Kind != ItemType.Property) { throw new Exception($"Unable to estimate value of invalid type: {subject.Kind}"); } return(Task.FromResult(subject.Value)); }
public static IEstimator GetEstimator(IItemOfValue item) { IEstimator estimator; switch (item.Kind) { case ItemType.Property: estimator = new PropertyEstimator(); break; case ItemType.Vehicle: estimator = new VehicleEstimator(); break; default: estimator = new GenericEstimator(); break; } return(estimator); }
public override Task <int> GetValue(IItemOfValue subject) { return(Task.FromResult(subject.Value)); }
public abstract Task <int> GetValue(IItemOfValue subject);