public static string GetCsName(Schema.Node.READER node) { foreach (var annotation in node.Annotations) { if (annotation.Id == AnnotationIds.Cs.Name) { return(annotation.Value.Text); } } return(null); }
public static bool?GetEmitDomainClassesAndInterfaces(Schema.Node.READER node) { foreach (var annotation in node.Annotations) { if (annotation.Id == AnnotationIds.Cs.EmitDomainClassesAndInterfaces && annotation.Value.which == Schema.Value.WHICH.Bool) { return(annotation.Value.Bool); } } return(null); }
public static TypeVisibility?GetTypeVisibility(Schema.Node.READER node) { foreach (var annotation in node.Annotations) { if (annotation.Id == AnnotationIds.Cs.TypeVisibility && annotation.Value.which == Schema.Value.WHICH.Enum) { return((TypeVisibility)annotation.Value.Enum); } } return(null); }
public static bool?GetEmitNullableDirective(Schema.Node.READER node) { foreach (var annotation in node.Annotations) { if (annotation.Id == AnnotationIds.Cs.EmitNullableDirective && annotation.Value.which == Schema.Value.WHICH.Bool) { return(annotation.Value.Bool); } } return(null); }
public static string[] GetNamespaceAnnotation(Schema.Node.READER fileNode) { foreach (var annotation in fileNode.Annotations) { if (annotation.Id == AnnotationIds.Cs.Namespace) { return(annotation.Value.Text.Split(new string[1] { "." }, default)); } if (annotation.Id == AnnotationIds.Cxx.Namespace) { return(annotation.Value.Text.Split(new string[1] { "::" }, default)); } } return(null); }