-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCategoryEntry.cs
More file actions
33 lines (27 loc) · 1013 Bytes
/
Copy pathCategoryEntry.cs
File metadata and controls
33 lines (27 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace JSONstat.Models;
/// <summary>
/// A flattened view of a single category within a dimension, returned by the
/// <c>Category</c> navigation family.
/// </summary>
public sealed class CategoryEntry
{
/// <summary>Creates a category entry.</summary>
public CategoryEntry(string id, string label, int index, double[]? coordinates, Unit? unit)
{
Id = id;
Label = label;
Index = index;
Coordinates = coordinates;
Unit = unit;
}
/// <summary>The category id.</summary>
public string Id { get; }
/// <summary>The category label (falls back to the id when absent).</summary>
public string Label { get; }
/// <summary>The category position within its dimension.</summary>
public int Index { get; }
/// <summary>Geographic coordinates [longitude, latitude], if any.</summary>
public double[]? Coordinates { get; }
/// <summary>Unit of measure, for metric-role categories.</summary>
public Unit? Unit { get; }
}