protected override void WriteReadBaseClassHandler(ClassBaseObject classBaseObject, ClassBaseObject.SubclassPair subclassPair) { writer.WriteLine($"return {this.MakeReadValueMethod(subclassPair.Subclass.FullName)}(input);"); }
// var inputField = $"input.GetProperty(\"{classBaseObject.TypeDiscriminator.CamelCaseName}\")"; // writer.WriteLine($"var type = {ReadFieldType(manager, inputField, "type", classBaseObject.TypeDiscriminator.Type, 0, writer)};"); protected abstract void WriteReadBaseClassTypeHandler(ClassBaseObject classBaseObject);
// var shortName = CodeGeneratorUtils.GetPrimitiveName(subclassPair.Subclass.FullName); // writer.WriteLine($"return Read{shortName}(input);"); protected abstract void WriteReadBaseClassHandler(ClassBaseObject classBaseObject, ClassBaseObject.SubclassPair subclassPair);
protected virtual void WriteReadClassBaseMethod(ClassBaseObject classBaseObject, string methodName, string generics, string constraints) { writer.Write($"public static {this.TrimNameSpace(classBaseObject.FullName)}{generics} {methodName}{generics}({this.ReadObject} input)"); writer.WriteLine(constraints); }
protected virtual void WriterClassBaseObjectMethod(string interfaceName, string generics, string constraints, ClassBaseObject classBaseObject) { writer.Write($"public static void Write{generics}({interfaceName}{generics} input, {this.WriteObject} output)"); writer.WriteLine(constraints); }
protected abstract void WriteBaseClassHandler(ClassBaseObject classBaseObject, ClassBaseObject.SubclassPair subclass, string castedName);
protected override void WriteReadBaseClassTypeHandler(ClassBaseObject classBaseObject) { var inputField = $"input.GetProperty(\"{classBaseObject.TypeDiscriminator.CamelCaseName}\")"; writer.WriteLine($"var type = {ReadFieldType(inputField, "type", classBaseObject.TypeDiscriminator.Type, 0)};"); }
protected override void WriterClassBaseObjectMethod(string interfaceName, string generics, string constraints, ClassBaseObject classBaseObject) { writer.Write($"public static JSONObject Write{generics}({interfaceName}{generics} input)"); writer.WriteLine(constraints); }