diff --git a/Esiur/Proxy/TemplateGenerator.cs b/Esiur/Proxy/TemplateGenerator.cs index 78e8888..bf925f2 100644 --- a/Esiur/Proxy/TemplateGenerator.cs +++ b/Esiur/Proxy/TemplateGenerator.cs @@ -84,7 +84,7 @@ public static class TemplateGenerator foreach (var p in template.Properties) { var ptTypeName = GetTypeName(p.ValueType, templates); - rt.AppendLine($"[Annotation[{ToLiteral(p.ReadAnnotation)}]"); + rt.AppendLine($"[Annotation({ToLiteral(p.ReadAnnotation)})]"); rt.AppendLine($"public {ptTypeName} {p.Name} {{ get; set; }}"); rt.AppendLine(); } @@ -297,7 +297,7 @@ public static class TemplateGenerator var positionalArgs = f.Arguments.Where((x) => !x.Optional).ToArray(); var optionalArgs = f.Arguments.Where((x) => x.Optional).ToArray(); - rt.AppendLine($"[Annotation[{ToLiteral(f.Annotation)}]"); + rt.AppendLine($"[Annotation({ToLiteral(f.Annotation)})]"); if (f.IsStatic) { @@ -361,7 +361,7 @@ public static class TemplateGenerator if (p.Inherited) continue; - rt.AppendLine($"[Annotation[{ToLiteral(p.ReadAnnotation)}]"); + rt.AppendLine($"[Annotation({ToLiteral(p.ReadAnnotation)})]"); var ptTypeName = GetTypeName(p.ValueType, templates); rt.AppendLine($"[Public] public {ptTypeName} {p.Name} {{"); @@ -378,7 +378,7 @@ public static class TemplateGenerator if (c.Inherited) continue; - rt.AppendLine($"[Annotation[{ToLiteral(c.Annotation)}]"); + rt.AppendLine($"[Annotation({ToLiteral(c.Annotation)})]"); var ctTypeName = GetTypeName(c.ValueType, templates); rt.AppendLine($"[Public] public const {ctTypeName} {c.Name} = {c.Value};"); @@ -398,7 +398,7 @@ public static class TemplateGenerator var etTypeName = GetTypeName(e.ArgumentType, templates); rt.AppendLine($"case {e.Index}: {e.Name}?.Invoke(({etTypeName})args); break;"); - eventsList.AppendLine($"[Annotation[{ToLiteral(e.Annotation)}]"); + eventsList.AppendLine($"[Annotation({ToLiteral(e.Annotation)})]"); eventsList.AppendLine($"[Public] public event ResourceEventHandler<{etTypeName}> {e.Name};"); }