public override void WriteLayout(TagLayout layout, TextWriter writer) { WriteHeader(writer); var name = layout.Name.ToSnakeCase(); var builder = new ClassBuilder(writer, 1); builder.Begin(name, layout.Size, layout.GroupTag); layout.Accept(builder); builder.End(); WriteFooter(writer); }
public override void WriteLayout(TagLayout layout, TextWriter writer) { WriteHeader(writer); var name = NamingConvention.ToPascalCase(layout.Name); var builder = new ClassBuilder(writer, 2); builder.Begin(name, layout.Size, layout.GroupTag); layout.Accept(builder); builder.End(); WriteFooter(writer); }
public override string GetSuggestedFileName(TagLayout layout) { return(string.Format("{0}.hpp", NamingConvention.ToPascalCase(layout.Name))); }
public override string GetSuggestedFileName(TagLayout layout) { return(string.Format("{0}.cs", layout.Name.ToPascalCase())); }
public override string GetSuggestedFileName(TagLayout layout) { return(string.Format("{0}.hpp", layout.Name.ToSnakeCase())); }
/// <summary> /// Writes a layout to a file. /// </summary> /// <param name="layout">The layout to write.</param> /// <param name="path">The path to write to.</param> public void WriteLayout(TagLayout layout, string path) { using (var writer = new StreamWriter(File.Open(path, FileMode.Create, FileAccess.Write))) WriteLayout(layout, writer); }
/// <summary> /// Writes a layout to a stream. /// </summary> /// <param name="layout">The layout to write.</param> /// <param name="writer">The writer to write to.</param> public abstract void WriteLayout(TagLayout layout, TextWriter writer);
/// <summary> /// Gets the suggested filename for a layout. /// </summary> /// <param name="layout">The layout.</param> /// <returns>A suggested filename to write the layout to.</returns> public abstract string GetSuggestedFileName(TagLayout layout);