/// <summary> /// Create a View Model with options and results /// </summary> private static SearchResultViewModel CreateViewModel(IPetrolDataListOptions options, PetrolDataServiceResultList result) { return result == null || options == null ? EmptyViewModel : new SearchResultViewModel() { Options = options, ResultList = result }; }
/// <summary> /// Equals Overload to determine, when two options are the same /// </summary> /// <param name="other">Second Options</param> /// <returns>true, if the options are the same, otherwise false</returns> public bool Equals(IPetrolDataListOptions other) { return this.SortOrder.Equals(other.SortOrder) && this.GeoPosition.Equals(other.GeoPosition) && this.PetrolType.Equals(other.PetrolType) && this.Radius.Equals(other.Radius); }