mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-23 10:33:50 +00:00
Serialisation key/value
This commit is contained in:
parent
5693971639
commit
fcfb44c3c9
3354 changed files with 17013 additions and 1360 deletions
|
|
@ -346,6 +346,27 @@ namespace AideDeJeuLib
|
|||
[IgnoreDataMember]
|
||||
public Dictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
[DataMember]
|
||||
public string AttributesDictionary
|
||||
{
|
||||
get
|
||||
{
|
||||
var builder = new SerializerBuilder();
|
||||
var serializer = builder
|
||||
.WithNamingConvention(new PascalCaseNamingConvention())
|
||||
.Build();
|
||||
return serializer.Serialize(Attributes);
|
||||
}
|
||||
set
|
||||
{
|
||||
var builder = new DeserializerBuilder();
|
||||
var deserializer = builder
|
||||
.WithNamingConvention(new PascalCaseNamingConvention())
|
||||
.Build();
|
||||
Attributes = deserializer.Deserialize<Dictionary<string, string>>(value);
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue