namespace ET { [FriendClass(typeof(Synthesis))] public static class SynthesisSystem { public static void FromMessage(this Synthesis self, SynthesisProto synthesisProto) { self.ConfigId = synthesisProto.ConfigId; self.UpdateTime = synthesisProto.UpdateTime; self.MaxAmount = synthesisProto.MaxAmount; self.CurrAmount = synthesisProto.CurrAmount; self.Progress = synthesisProto.Progress; } public static SynthesisProto ToMessage(this Synthesis self) { SynthesisProto proto = new SynthesisProto(); proto.ConfigId = self.ConfigId; proto.UpdateTime = self.UpdateTime; proto.MaxAmount = self.MaxAmount; proto.CurrAmount = self.CurrAmount; proto.Progress = self.Progress; return proto; } } }