Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ public interface IGeoSuggestContext : ISuggestContext
bool? Neighbors { get; set; }

[DataMember(Name = "precision")]
IEnumerable<string> Precision { get; set; }
string Precision { get; set; }
}

[DataContract]
public class GeoSuggestContext : SuggestContextBase, IGeoSuggestContext
{
public bool? Neighbors { get; set; }

public IEnumerable<string> Precision { get; set; }
public string Precision { get; set; }
public override string Type => "geo";
}

Expand All @@ -30,9 +30,9 @@ public class GeoSuggestContextDescriptor<T>
{
protected override string Type => "geo";
bool? IGeoSuggestContext.Neighbors { get; set; }
IEnumerable<string> IGeoSuggestContext.Precision { get; set; }
string IGeoSuggestContext.Precision { get; set; }

public GeoSuggestContextDescriptor<T> Precision(params string[] precisions) => Assign(precisions, (a, v) => a.Precision = v);
public GeoSuggestContextDescriptor<T> Precision(string precision) => Assign(precision, (a, v) => a.Precision = v);

public GeoSuggestContextDescriptor<T> Neighbors(bool? neighbors = true) => Assign(neighbors, (a, v) => a.Neighbors = v);
}
Expand Down