Skip to content

Commit

Permalink
refactor: update serializer method names (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
poi-vrc authored Aug 23, 2023
1 parent 50c76ba commit 5102196
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Chocopoi.DressingTools.Lib.Wearable.Serializers
{
public interface ISerializer
{
JObject SerializeFrom(object obj);
void DeserializeFrom(object obj, JObject jObject);
JObject Serialize(object obj);
void Deserialize(object obj, JObject jObject);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static WearableModule DeserializeModule(JObject jObject)
private const string KeyAvatarConfig = "avatarConfig";
private const string KeyModules = "modules";

public void DeserializeFrom(object obj, JObject jObject)
public void Deserialize(object obj, JObject jObject)
{
// TODO: perform schema check here
var config = (WearableConfig)obj;
Expand Down Expand Up @@ -127,7 +127,7 @@ public void DeserializeFrom(object obj, JObject jObject)
}
}

public JObject SerializeFrom(object obj)
public JObject Serialize(object obj)
{
var config = (WearableConfig)obj;
var jObject = new JObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public virtual void DeserializeFrom(JObject jObject)
throw new Exception("Incompatible object version for deserialization");
}

serializer.DeserializeFrom(this, jObject);
serializer.Deserialize(this, jObject);
}

public virtual JObject Serialize()
Expand All @@ -58,7 +58,7 @@ public virtual JObject Serialize()
throw new Exception("Incompatible object version for serialization");
}

return serializer.SerializeFrom(this);
return serializer.Serialize(this);
}
}
}

0 comments on commit 5102196

Please sign in to comment.