2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 /// Place Review information, used in Place Discovery and Search requests
24 public class PlaceReview
26 private DateTime _date;
27 private string _title;
28 private double _rating;
29 private string _description;
30 private string _language;
31 private PlaceMedia _media;
32 private PlaceLink _userLink;
34 internal PlaceReview(Interop.PlaceReviewHandle handle)
36 string date = handle.Date;
37 if (DateTime.TryParse(date, out _date) == false)
39 Interop.ErrorCode.InvalidParameter.WarnIfFailed($"Wrong date format: {date}");
42 _title = handle.Title;
43 _rating = handle.Rating;
44 _description = handle.Description;
45 _language = handle.Language;
46 _media = new PlaceMedia(handle.Media);
47 _userLink = new PlaceLink(handle.User);
51 /// Gets an instance of <see cref="DateTime"/> object which representing time of this review.
53 public DateTime Date { get { return _date; } }
56 /// Gets a string which representing title of this review.
58 public string Title { get { return _title; } }
61 /// Gets a value which representing rating of this review.
63 public double Rating { get { return _rating; } }
66 /// Gets a string which representing description of this review.
68 public string Description { get { return _description; } }
71 /// Gets a string which representing language of this review.
73 public string Language { get { return _language; } }
76 /// Gets an instance of <see cref="PlaceMedia"/> object which representing review media of this review.
78 public PlaceMedia ReviewMedia { get { return _media; } }
81 /// Gets an instance of <see cref="PlaceLink"/> object which representing user link of this review.
83 public PlaceLink UserLink { get { return _userLink; } }