1using System.Collections.Generic;
33 get {
return string.Join(
", ",
ModelList.Select(x => x.Name)); }
43 var currentModel =
ModelList.FirstOrDefault();
44 var jsonOfChannel = JsonConvert.SerializeObject(currentModel,
new JsonSerializerSettings());
46 JsonConvert.DeserializeObject<
ModelToSerialize>(jsonOfChannel,
new JsonSerializerSettings());
61 [JsonProperty]
private string _name;
This class is an exemplary model, which is used to demonstrate the MAC serialization process.
string _name
[JsonProperty] means that this attribute will be serialized with its value to get the value again aft...
string Name
[JsonIgnore] means that this attribute will not be serialized. This property gets and sets the "_name...
ModelToSerialize(string name)
Creates a new object of the class and set the name.
string StringOfAllNames
This is the string which will be displayed in the View.
List< ModelToSerialize > ModelList
List of models for serialization.
void CopyModel()
This function gets the first element of the ModelList. Serialize the object, deserialize an object of...
NonTIAProjectBased(string name)
Creates a new object of the class, create a new object of ModelToSerialize and add it to the ModelLis...