public static void Write(TextWriter writer, ResourceSchema resourceSchema) { if (writer == null) { throw new ArgumentNullException("writer"); } if (resourceSchema == null) { throw new ArgumentNullException("resourceSchema"); } var mdWriter = new ResourceMarkdownWriter(writer, resourceSchema); mdWriter.Generate(); }
public override async Task Generate(CodeModel serviceClient) { IDictionary <string, ResourceSchema> resourceSchemas = ResourceSchemaParser.Parse(serviceClient); foreach (string resourceProvider in resourceSchemas.Keys) { StringWriter stringWriter = new StringWriter(); ResourceSchemaWriter.Write(stringWriter, resourceSchemas[resourceProvider]); await Write(stringWriter.ToString(), resourceProvider + ".json", true); stringWriter = new StringWriter(); ResourceMarkdownWriter.Write(stringWriter, resourceSchemas[resourceProvider]); await Write(stringWriter.ToString(), resourceProvider + ".md", false); } }