Beispiel #1
0
 public void OnBeforeSerialize()
 {
     ComponentsJSON.Clear();
     foreach (var connectionComponentConfigBase in Components)
     {
         var t       = connectionComponentConfigBase.GetType();
         var jsonRow = new Common.Serialization.DerivedComponentJsonDataRow()
         {
             AssemblyQualifiedName = t.AssemblyQualifiedName,
         };
         jsonRow.JsonText = JSONSerializer.Serialize(t, connectionComponentConfigBase, false,
                                                     jsonRow.SerializedObjects);
         ComponentsJSON.Add(jsonRow);
     }
 }
Beispiel #2
0
 public void OnBeforeSerialize()
 {
     ComponentsJSON.Clear();
     foreach (var proceduralLayerComponent in Components)
     {
         var type    = proceduralLayerComponent.GetType();
         var jsonRow = new Common.Serialization.DerivedComponentJsonDataRow()
         {
             AssemblyQualifiedName = type.AssemblyQualifiedName,
             SerializedObjects     = new List <Object>(),
         };
         jsonRow.JsonText = JSONSerializer.Serialize(type, proceduralLayerComponent, false,
                                                     jsonRow.SerializedObjects);
         ComponentsJSON.Add(jsonRow);
     }
 }