protected override async Task GenerateClassLine(StructuredStringBuilder sb) { using (var args = sb.Class(ObjectName)) { args.Abstract = Abstract; args.Partial = true; if (HasLoquiBaseObject && HasNonLoquiBaseObject) { throw new ArgumentException("Cannot define both a loqui and non-loqui base class"); } if (HasLoquiBaseObject) { args.BaseClass = BaseClassName; } else if (HasNonLoquiBaseObject && SetBaseClass) { args.BaseClass = NonLoquiBaseClass; } args.Interfaces.Add(Interface(getter: false, internalInterface: true)); args.Interfaces.Add($"ILoquiObjectSetter<{ObjectName}>"); args.Interfaces.Add(Interfaces.Get(LoquiInterfaceType.Direct)); args.Interfaces.Add(await GetApplicableInterfaces(LoquiInterfaceType.Direct).ToListAsync()); args.Interfaces.Add(ProtoGen.Interfaces); args.Interfaces.Add(gen.Interfaces); args.Interfaces.Add($"IEquatable<{Interface(getter: true, internalInterface: true)}>"); } }
protected override async Task GenerateClassLine(StructuredStringBuilder sb) { // Generate class header and interfaces using (sb.Line()) { using (var args = sb.Class($"{Name}{GetGenericTypes(MaskType.Normal)}")) { args.Partial = true; args.Type = ObjectType.Struct; args.Interfaces.Add(Interface(getter: true)); args.Interfaces.Add(Interfaces.Get(LoquiInterfaceType.Direct)); args.Interfaces.Add(await GetApplicableInterfaces(LoquiInterfaceType.Direct).ToListAsync()); args.Interfaces.Add($"IEquatable<{ObjectName}>"); } } }