-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathEntity.cs
More file actions
29 lines (26 loc) · 811 Bytes
/
Entity.cs
File metadata and controls
29 lines (26 loc) · 811 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
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Recombee.ApiClient.Bindings
{
/// <summary>Base class for the entities</summary>
public abstract class Entity: RecombeeBinding
{
private readonly Dictionary<string, object> values;
/// <summary>Values of properties</summary>
[JsonProperty("values")]
public Dictionary<string, object> Values
{
get
{
if(values == null)
throw new InvalidOperationException("The request was not meant to return values (use returnProperties parameter)");
return values;
}
}
public Entity(Dictionary<string, object> values)
{
this.values = values;
}
}
}