mirror of
https://github.com/AssetRipper/AssetRipper.Text.Html.git
synced 2026-11-13 18:06:43 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4148e837a3 | ||
|
|
1011d5b2da | ||
|
|
7ddacda1eb | ||
|
|
f6b6e5e230 | ||
|
|
24eead1208 | ||
|
|
0ee82564f5 | ||
|
|
6407f5a0ed | ||
|
|
0988830110 | ||
|
|
9ae1c834e9 | ||
|
|
25109e1c47 | ||
|
|
615abf0a90 | ||
|
|
b59fcb6d38 | ||
|
|
e103bcc74f |
No files matched your search
@@ -13,9 +13,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="1.1.2" />
|
||||
<PackageReference Include="AssetRipper.Text.SourceGeneration" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
|
||||
<PackageReference Include="AngleSharp" Version="1.2.0" />
|
||||
<PackageReference Include="AssetRipper.Text.SourceGeneration" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -66,7 +66,7 @@ internal static class Program
|
||||
{
|
||||
using (new Form(writer).WithAction("/Result").WithMethod("post").End())
|
||||
{
|
||||
new Textarea(writer)
|
||||
new TextArea(writer)
|
||||
.WithName(HtmlFormName)
|
||||
.WithClass("bg-dark-subtle rounded-3 p-2")
|
||||
.WithStyle("width: 100%; height: 90%")
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AssetRipper.Text.SourceGeneration" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
|
||||
<PackageReference Include="SourceGenerator.Foundations" Version="2.0.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Generator dependencies -->
|
||||
<PackageReference Include="AssetRipper.Text.SourceGeneration" Version="1.2.2" PrivateAssets="all" GeneratePathProperty="true" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.1" PrivateAssets="all" GeneratePathProperty="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+125
-29
@@ -1,24 +1,35 @@
|
||||
using AssetRipper.Text.Html.Model;
|
||||
using AssetRipper.Text.SourceGeneration;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using SGF;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Net;
|
||||
|
||||
namespace HtmlSharp.Generator;
|
||||
|
||||
internal class Program
|
||||
[IncrementalGenerator]
|
||||
public sealed class HtmlGenerator : IncrementalGenerator
|
||||
{
|
||||
private const string RepositoryRoot = "../../../../";
|
||||
private const string TargetProject = RepositoryRoot + "AssetRipper.Text.Html/";
|
||||
private const string GeneratedFolder = TargetProject + "Generated/";
|
||||
public HtmlGenerator() : base(nameof(HtmlGenerator))
|
||||
{
|
||||
}
|
||||
|
||||
static void Main()
|
||||
public override void OnInitialize(SgfInitializationContext context)
|
||||
{
|
||||
context.RegisterPostInitializationOutput(GenerateCode);
|
||||
}
|
||||
|
||||
private static void GenerateCode(IncrementalGeneratorPostInitializationContext context)
|
||||
{
|
||||
HtmlJsonLoader.Load(out List<HtmlAttribute> globalAttributes, out List<HtmlAttribute> localAttributes, out List<HtmlElement> elements);
|
||||
|
||||
Directory.CreateDirectory(GeneratedFolder);
|
||||
|
||||
// Global attributes
|
||||
{
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(GeneratedFolder, "IGlobalAttributes");
|
||||
StringWriter stringWriter = new()
|
||||
{
|
||||
NewLine = "\n",
|
||||
};
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(stringWriter);
|
||||
|
||||
writer.WriteGeneratedCodeWarning();
|
||||
writer.WriteLineNoTabs();
|
||||
@@ -26,27 +37,38 @@ internal class Program
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteFileScopedNamespace("AssetRipper.Text.Html");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine("public interface IGlobalAttributes<TSelf> where TSelf : IGlobalAttributes<TSelf>, allows ref struct");
|
||||
using (new CurlyBrackets(writer))
|
||||
writer.WriteLine("public interface IGlobalAttributes<TSelf> :");
|
||||
using (new Indented(writer))
|
||||
{
|
||||
for (int i = 0; i < globalAttributes.Count; i++)
|
||||
{
|
||||
HtmlAttribute attribute = globalAttributes[i];
|
||||
if (i > 0)
|
||||
if (i < globalAttributes.Count - 1)
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine($"{attribute.InterfaceName}<TSelf>,");
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLine($"{attribute.InterfaceName}<TSelf>");
|
||||
}
|
||||
writer.WriteLine($"string {attribute.PropertyName} {{ set; }}");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine($"TSelf {attribute.FluentMethodName}(string? value = null);");
|
||||
}
|
||||
writer.WriteLine("where TSelf : IGlobalAttributes<TSelf>, allows ref struct");
|
||||
}
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
}
|
||||
|
||||
context.AddSource("IGlobalAttributes.g.cs", stringWriter.ToString());
|
||||
}
|
||||
|
||||
// Local attributes
|
||||
foreach (HtmlAttribute attribute in localAttributes)
|
||||
foreach (HtmlAttribute attribute in localAttributes.Concat(globalAttributes))
|
||||
{
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(GeneratedFolder, attribute.InterfaceName);
|
||||
StringWriter stringWriter = new()
|
||||
{
|
||||
NewLine = "\n",
|
||||
};
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(stringWriter);
|
||||
|
||||
writer.WriteGeneratedCodeWarning();
|
||||
writer.WriteLineNoTabs();
|
||||
@@ -54,18 +76,23 @@ internal class Program
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteFileScopedNamespace("AssetRipper.Text.Html");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteSummaryDocumentation(WebUtility.HtmlEncode(attribute.Description));
|
||||
writer.WriteLine($"public interface {attribute.InterfaceName}<TSelf> where TSelf : {attribute.InterfaceName}<TSelf>, allows ref struct");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
writer.WriteLine($"string {attribute.PropertyName} {{ set; }}");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine($"TSelf {attribute.FluentMethodName}(string? value = null);");
|
||||
WriteAttributeInterfacePropertyAndMethods(writer, attribute);
|
||||
}
|
||||
|
||||
context.AddSource($"{attribute.InterfaceName}.g.cs", stringWriter.ToString());
|
||||
}
|
||||
|
||||
foreach (HtmlElement element in elements)
|
||||
{
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(GeneratedFolder, element.ClassName);
|
||||
StringWriter stringWriter = new()
|
||||
{
|
||||
NewLine = "\n",
|
||||
};
|
||||
IndentedTextWriter writer = IndentedTextWriterFactory.Create(stringWriter);
|
||||
|
||||
writer.WriteGeneratedCodeWarning();
|
||||
writer.WriteLineNoTabs();
|
||||
@@ -73,6 +100,7 @@ internal class Program
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteFileScopedNamespace("AssetRipper.Text.Html");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteSummaryDocumentation(WebUtility.HtmlEncode(element.Description));
|
||||
writer.WriteLine($"public readonly ref partial struct {element.ClassName} : IHtmlElement<{element.ClassName}>,");
|
||||
using (new Indented(writer))
|
||||
{
|
||||
@@ -96,8 +124,19 @@ internal class Program
|
||||
}
|
||||
foreach (HtmlAttribute attribute in element.Attributes.Values)
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
|
||||
string propertyName = attribute.GetPropertyName(element.ClassName);
|
||||
writer.WriteLineNoTabs();
|
||||
bool needExplicitPropertyImplementation = propertyName != attribute.PropertyName;
|
||||
string explicitPropertyName = $"{attribute.InterfaceName}<{element.ClassName}>.{attribute.PropertyName}";
|
||||
if (needExplicitPropertyImplementation)
|
||||
{
|
||||
writer.WriteInheritDocumentation(explicitPropertyName.Replace('<', '{').Replace('>', '}'));
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteInheritDocumentation();
|
||||
}
|
||||
writer.WriteLine($"public string? {propertyName}");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
@@ -109,46 +148,71 @@ internal class Program
|
||||
writer.WriteLine("writer.Write('\"');");
|
||||
}
|
||||
}
|
||||
if (propertyName != attribute.PropertyName)
|
||||
if (needExplicitPropertyImplementation)
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine($"string {attribute.InterfaceName}<{element.ClassName}>.{attribute.PropertyName}");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"string? {explicitPropertyName}");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
writer.WriteLine($"set => {propertyName} = value;");
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
|
||||
string fluentMethodName = attribute.GetFluentMethodName(element.ClassName);
|
||||
writer.WriteLineNoTabs();
|
||||
bool needExplicitMethodImplementation = fluentMethodName != attribute.FluentMethodName;
|
||||
string explicitFluentMethodName = $"{attribute.InterfaceName}<{element.ClassName}>.{attribute.FluentMethodName}";
|
||||
if (needExplicitMethodImplementation)
|
||||
{
|
||||
writer.WriteInheritDocumentation(explicitFluentMethodName.Replace('<', '{').Replace('>', '}'));
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteInheritDocumentation();
|
||||
}
|
||||
writer.WriteLine($"public {element.ClassName} {fluentMethodName}(string? value = null)");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
writer.WriteLine($"{attribute.GetPropertyName(element.ClassName)} = value;");
|
||||
writer.WriteLine("return this;");
|
||||
}
|
||||
if (fluentMethodName != attribute.FluentMethodName)
|
||||
if (needExplicitMethodImplementation)
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteLine($"{element.ClassName} {attribute.InterfaceName}<{element.ClassName}>.{attribute.FluentMethodName}(string? value = null)");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"{element.ClassName} {explicitFluentMethodName}(string? value = null)");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
writer.WriteLine($"return {fluentMethodName}(value);");
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"public {element.ClassName} {attribute.MaybeMethodName}(bool exists, string? value = null)");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
writer.WriteLine($"return exists ? {fluentMethodName}(value) : this;");
|
||||
}
|
||||
}
|
||||
|
||||
if (element.IsVoidElement)
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine("public void Close() => writer.Write(\"/>\");");
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"HtmlElementCloser IHtmlElement<{element.ClassName}>.End() => throw new NotSupportedException();");
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine("public void Close() => writer.Write($\"></{ElementName}>\");");
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
@@ -163,6 +227,7 @@ internal class Program
|
||||
}
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine("public HtmlElementCloser End()");
|
||||
using (new CurlyBrackets(writer))
|
||||
{
|
||||
@@ -175,10 +240,16 @@ internal class Program
|
||||
{
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteComment("IHtmlElement<TSelf> implementation");
|
||||
writer.WriteLineNoTabs();
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"TextWriter IHtmlElement<{element.ClassName}>.Writer => writer;");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"static {element.ClassName} IHtmlElement<{element.ClassName}>.Create(TextWriter writer) => new(writer);");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"static bool IHtmlElement<{element.ClassName}>.IsVoidElement => {element.IsVoidElement.ToString().ToLowerInvariant()};");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"static string IHtmlElement<{element.ClassName}>.Name => ElementName;");
|
||||
writer.WriteInheritDocumentation();
|
||||
writer.WriteLine($"static ReadOnlySpan<string> IHtmlElement<{element.ClassName}>.SupportedAttributes => _supportedAttributes;");
|
||||
writer.WriteLine("private static readonly string[] _supportedAttributes =");
|
||||
writer.WriteLine('[');
|
||||
@@ -192,8 +263,33 @@ internal class Program
|
||||
writer.WriteLine("];");
|
||||
}
|
||||
}
|
||||
Console.WriteLine(element.Name);
|
||||
|
||||
context.AddSource($"{element.ClassName}.g.cs", stringWriter.ToString());
|
||||
}
|
||||
Console.WriteLine("Done!");
|
||||
}
|
||||
|
||||
private static void WriteAttributeInterfacePropertyAndMethods(IndentedTextWriter writer, HtmlAttribute attribute)
|
||||
{
|
||||
string encodedDescription = WebUtility.HtmlEncode(attribute.Description);
|
||||
|
||||
writer.WriteSummaryDocumentation($"Includes the {attribute.Name} attribute.");
|
||||
writer.WriteRemarksDocumentation(encodedDescription);
|
||||
writer.WriteParameterDocumentation("value", "The value to set. It is NOT automatically Html-encoded.");
|
||||
writer.WriteLine($"string? {attribute.PropertyName} {{ set; }}");
|
||||
|
||||
writer.WriteLineNoTabs();
|
||||
|
||||
writer.WriteSummaryDocumentation($"Includes the {attribute.Name} attribute.");
|
||||
writer.WriteRemarksDocumentation(encodedDescription);
|
||||
writer.WriteParameterDocumentation("value", "The value to set. It is NOT automatically Html-encoded.");
|
||||
writer.WriteReturnsDocumentation("This instance.");
|
||||
writer.WriteLine($"TSelf {attribute.FluentMethodName}(string? value = null);");
|
||||
|
||||
writer.WriteSummaryDocumentation($"Might include the {attribute.Name} attribute.");
|
||||
writer.WriteRemarksDocumentation(encodedDescription);
|
||||
writer.WriteParameterDocumentation("exists", "Whether or not the attribute should be included.");
|
||||
writer.WriteParameterDocumentation("value", "The value to set. It is NOT automatically Html-encoded.");
|
||||
writer.WriteReturnsDocumentation("This instance.");
|
||||
writer.WriteLine($"TSelf {attribute.MaybeMethodName}(bool exists, string? value = null);");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
@@ -11,4 +12,13 @@
|
||||
<EmbeddedResource Include="*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="PolySharp" Version="1.15.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Linq" Version="4.3.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.1" PrivateAssets="all" GeneratePathProperty="true" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -3,16 +3,20 @@
|
||||
public sealed class HtmlAttribute
|
||||
{
|
||||
public string Name { get; }
|
||||
public string InterfaceName => Global ? "IGlobalAttributes" : $"I{PropertyName}Attribute";
|
||||
public string Description { get; }
|
||||
public string InterfaceName => $"I{PropertyName}Attribute";
|
||||
public string PropertyName { get; }
|
||||
public string FluentMethodName { get; }
|
||||
public string MaybeMethodName { get; }
|
||||
public bool Global { get; }
|
||||
|
||||
public HtmlAttribute(string name, bool global)
|
||||
public HtmlAttribute(string name, string description, bool global)
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
PropertyName = GetPascalName(name);
|
||||
FluentMethodName = $"With{GetPascalName(name)}";
|
||||
FluentMethodName = $"With{PropertyName}";
|
||||
MaybeMethodName = $"Maybe{FluentMethodName}";
|
||||
Global = global;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,16 @@
|
||||
public sealed class HtmlElement
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Description { get; }
|
||||
public string ClassName { get; }
|
||||
public bool IsVoidElement { get; }
|
||||
public IReadOnlyDictionary<string, HtmlAttribute> Attributes { get; }
|
||||
|
||||
public HtmlElement(string name, IEnumerable<string> attributes, Dictionary<string, HtmlAttribute> attributeDictionary)
|
||||
public HtmlElement(string name, string description, IEnumerable<string> attributes, Dictionary<string, HtmlAttribute> attributeDictionary)
|
||||
{
|
||||
Name = name;
|
||||
ClassName = HtmlHelper.ConvertKebabToPascal(name);
|
||||
Description = description;
|
||||
ClassName = GetPascalName(name);
|
||||
IsVoidElement = HtmlHelper.IsVoidElement(name);
|
||||
Dictionary<string, HtmlAttribute> dictionary = new();
|
||||
foreach (string attribute in attributes)
|
||||
@@ -19,4 +21,26 @@ public sealed class HtmlElement
|
||||
}
|
||||
Attributes = dictionary;
|
||||
}
|
||||
|
||||
private static string GetPascalName(string name) => name switch
|
||||
{
|
||||
"blockquote" => "BlockQuote",
|
||||
"colgroup" => "ColGroup",
|
||||
"datalist" => "DataList",
|
||||
"fencedframe" => "FencedFrame",
|
||||
"fieldset" => "FieldSet",
|
||||
"figcaption" => "FigCaption",
|
||||
"frameset" => "FrameSet",
|
||||
"hgroup" => "HGroup",
|
||||
"iframe" => "IFrame",
|
||||
"menuitem" => "MenuItem",
|
||||
"nobr" => "NoBr",
|
||||
"noembed" => "NoEmbed",
|
||||
"noframes" => "NoFrames",
|
||||
"noscript" => "NoScript",
|
||||
"optgroup" => "OptGroup",
|
||||
"plaintext" => "PlainText",
|
||||
"textarea" => "TextArea",
|
||||
_ => HtmlHelper.ConvertKebabToPascal(name),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace AssetRipper.Text.Html.Model;
|
||||
|
||||
public readonly record struct HtmlElementData(string Name, string Description, List<string> Attributes);
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace AssetRipper.Text.Html.Model;
|
||||
|
||||
public sealed record HtmlJson(List<KeyValuePair<string, List<string>>> Elements, List<string> GlobalAttributes)
|
||||
public sealed record HtmlJson(List<HtmlElementData> Elements, List<string> GlobalAttributes, List<KeyValuePair<string, string>> AttributeDescriptions)
|
||||
{
|
||||
public HtmlJson() : this([], [])
|
||||
public HtmlJson() : this([], [], [])
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,13 +18,14 @@ public sealed class HtmlJsonLoader
|
||||
globalAttributes = new();
|
||||
foreach (string name in data.GlobalAttributes)
|
||||
{
|
||||
HtmlAttribute attribute = new HtmlAttribute(name, true);
|
||||
string description = data.AttributeDescriptions.FirstOrDefault(t => t.Key == name).Value ?? "";
|
||||
HtmlAttribute attribute = new HtmlAttribute(name, description, true);
|
||||
attributeDictionary.Add(name, attribute);
|
||||
globalAttributes.Add(attribute);
|
||||
}
|
||||
|
||||
localAttributes = new();
|
||||
foreach ((_, List<string> attributeList) in data.Elements)
|
||||
foreach ((_, _, List<string> attributeList) in data.Elements)
|
||||
{
|
||||
foreach (string name in attributeList)
|
||||
{
|
||||
@@ -33,16 +34,17 @@ public sealed class HtmlJsonLoader
|
||||
continue;
|
||||
}
|
||||
|
||||
HtmlAttribute attribute = new HtmlAttribute(name, false);
|
||||
string description = data.AttributeDescriptions.FirstOrDefault(t => t.Key == name).Value ?? "";
|
||||
HtmlAttribute attribute = new HtmlAttribute(name, description, false);
|
||||
attributeDictionary.Add(name, attribute);
|
||||
localAttributes.Add(attribute);
|
||||
}
|
||||
}
|
||||
|
||||
elements = new();
|
||||
foreach ((string elementName, List<string> attributeArray) in data.Elements)
|
||||
foreach ((string elementName, string description, List<string> attributeArray) in data.Elements)
|
||||
{
|
||||
elements.Add(new HtmlElement(elementName, attributeArray.Union(data.GlobalAttributes).Order(), attributeDictionary));
|
||||
elements.Add(new HtmlElement(elementName, description, attributeArray.Union(data.GlobalAttributes).Order(), attributeDictionary));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace AssetRipper.Text.Html.Model;
|
||||
#if NETSTANDARD
|
||||
internal static class NetStandardExtensions
|
||||
{
|
||||
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> pair, out TKey key, out TValue value)
|
||||
{
|
||||
key = pair.Key;
|
||||
value = pair.Value;
|
||||
}
|
||||
|
||||
public static IEnumerable<T> Order<T>(this IEnumerable<T> enumerable)
|
||||
{
|
||||
return enumerable.OrderBy(t => t);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,17 +2,17 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="1.1.2" />
|
||||
<PackageReference Include="AngleSharp" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AssetRipper.Text.Html.Model\AssetRipper.Text.Html.Model.csproj" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AssetRipper.Text.Html.Model\AssetRipper.Text.Html.Model.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace AssetRipper.Text.Html.Scraper;
|
||||
|
||||
class Program
|
||||
static class Program
|
||||
{
|
||||
private const string UrlElements = "https://developer.mozilla.org/en-US/docs/Web/HTML/Element";
|
||||
private const string UrlAttributes = "https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes";
|
||||
@@ -20,33 +20,47 @@ class Program
|
||||
|
||||
static HtmlJson Scrape()
|
||||
{
|
||||
Dictionary<string, List<string>> htmlElements = new();
|
||||
Dictionary<string, (List<string>, string)> htmlElements = new();
|
||||
List<string> globalAttributes = new();
|
||||
Dictionary<string, string> attributeDescriptions = new();
|
||||
ScrapeElements(htmlElements);
|
||||
ScrapeAttributes(htmlElements, globalAttributes);
|
||||
ScrapeAttributes(htmlElements, globalAttributes, attributeDescriptions);
|
||||
globalAttributes.Sort();
|
||||
return new HtmlJson(htmlElements.OrderBy(p => p.Key).ToList(), globalAttributes);
|
||||
return new HtmlJson(
|
||||
htmlElements.OrderBy(p => p.Key).Select(p => new HtmlElementData(p.Key, p.Value.Item2, p.Value.Item1)).ToList(),
|
||||
globalAttributes,
|
||||
attributeDescriptions.OrderBy(p => p.Key).ToList());
|
||||
}
|
||||
|
||||
static void ScrapeElements(Dictionary<string, List<string>> htmlElements)
|
||||
static void ScrapeElements(Dictionary<string, (List<string>, string)> htmlElements)
|
||||
{
|
||||
IConfiguration config = Configuration.Default.WithDefaultLoader();
|
||||
IBrowsingContext context = BrowsingContext.New(config);
|
||||
IDocument document = context.OpenAsync(UrlElements).GetAwaiter().GetResult();
|
||||
|
||||
foreach (IElement td in document.QuerySelectorAll("table td:first-child"))
|
||||
|
||||
foreach (IElement tr in document.QuerySelectorAll("table tr"))
|
||||
{
|
||||
foreach (string e in td.TextContent.Split(','))
|
||||
IElement? td1 = tr.QuerySelector("td:first-child");
|
||||
IElement? td2 = tr.QuerySelector("td:nth-child(2)");
|
||||
|
||||
if (td1 == null || td2 == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string description = td2.TextContent.RemoveExtraWhiteSpace();
|
||||
|
||||
foreach (string e in td1.TextContent.Split(','))
|
||||
{
|
||||
if (TryTrim(e, out string? element))
|
||||
{
|
||||
htmlElements[element] = new();
|
||||
htmlElements[element] = (new(), description);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ScrapeAttributes(Dictionary<string, List<string>> htmlElements, List<string> globalAttributes)
|
||||
static void ScrapeAttributes(Dictionary<string, (List<string>, string)> htmlElements, List<string> globalAttributes, Dictionary<string, string> attributeDescriptions)
|
||||
{
|
||||
IConfiguration config = Configuration.Default.WithDefaultLoader();
|
||||
IBrowsingContext context = BrowsingContext.New(config);
|
||||
@@ -56,8 +70,9 @@ class Program
|
||||
{
|
||||
IElement? td1 = tr.QuerySelector("td:first-child code");
|
||||
IElement? td2 = tr.QuerySelector("td:nth-child(2)");
|
||||
IElement? td3 = tr.QuerySelector("td:nth-child(3)");
|
||||
|
||||
if (td1 != null && td2 != null)
|
||||
if (td1 != null && td2 != null && td3 != null)
|
||||
{
|
||||
string attr = td1.TextContent;
|
||||
if (attr is "data-*")
|
||||
@@ -68,6 +83,10 @@ class Program
|
||||
continue;
|
||||
}
|
||||
|
||||
string description = td3.TextContent.RemoveExtraWhiteSpace();
|
||||
|
||||
attributeDescriptions[attr] = description;
|
||||
|
||||
foreach (string e in td2.TextContent.Split(','))
|
||||
{
|
||||
if (TryTrim(e, out string? element))
|
||||
@@ -78,7 +97,7 @@ class Program
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlElements[element].Add(attr);
|
||||
htmlElements[element].Item1.Add(attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,4 +125,9 @@ class Program
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static string RemoveExtraWhiteSpace(this string value)
|
||||
{
|
||||
return string.Join(' ', value.Split([' ', '\n', '\r', '\t'], StringSplitOptions.RemoveEmptyEntries));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
@@ -10,16 +10,16 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.6.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
<LangVersion>preview</LangVersion>
|
||||
|
||||
<Version>2.0.0</Version>
|
||||
<Version>2.1.0</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<Copyright>Copyright © 2023 - 2024 ds5678</Copyright>
|
||||
<Copyright>Copyright © 2023 - 2025 ds5678</Copyright>
|
||||
<Authors>ds5678</Authors>
|
||||
<Company>AssetRipper</Company>
|
||||
|
||||
@@ -31,4 +30,8 @@
|
||||
<None Include="../README.md" Pack="true" PackagePath="\"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AssetRipper.Text.Html.Generator\AssetRipper.Text.Html.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -10,6 +10,12 @@ public static class CustomAttributes
|
||||
return element;
|
||||
}
|
||||
|
||||
public static TSelf MaybeWithCustomAttribute<TSelf>(this TSelf element, bool exists, string key, string? value = null)
|
||||
where TSelf : IHtmlElement<TSelf>, allows ref struct
|
||||
{
|
||||
return exists ? element.WithCustomAttribute(key, value) : element;
|
||||
}
|
||||
|
||||
public static TSelf WithCustomAttributes<TSelf>(this TSelf element, scoped ReadOnlySpan<(string, string?)> attributes)
|
||||
where TSelf : IHtmlElement<TSelf>, allows ref struct
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
/// <summary>
|
||||
/// A class for custom HTML elements.
|
||||
|
||||
@@ -1,500 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct A : IHtmlElement<A>,
|
||||
IDownloadAttribute<A>,
|
||||
IHrefAttribute<A>,
|
||||
IHrefLangAttribute<A>,
|
||||
IMediaAttribute<A>,
|
||||
IPingAttribute<A>,
|
||||
IReferrerPolicyAttribute<A>,
|
||||
IRelAttribute<A>,
|
||||
IShapeAttribute<A>,
|
||||
ITargetAttribute<A>,
|
||||
IGlobalAttributes<A>
|
||||
{
|
||||
private const string ElementName = "a";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public A(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Download
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" download=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithDownload(string? value = null)
|
||||
{
|
||||
Download = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Href
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" href=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithHref(string? value = null)
|
||||
{
|
||||
Href = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? HrefLang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hreflang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithHrefLang(string? value = null)
|
||||
{
|
||||
HrefLang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Media
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" media=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithMedia(string? value = null)
|
||||
{
|
||||
Media = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Ping
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" ping=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithPing(string? value = null)
|
||||
{
|
||||
Ping = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ReferrerPolicy
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" referrerpolicy=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithReferrerPolicy(string? value = null)
|
||||
{
|
||||
ReferrerPolicy = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Rel
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" rel=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithRel(string? value = null)
|
||||
{
|
||||
Rel = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Shape
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" shape=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithShape(string? value = null)
|
||||
{
|
||||
Shape = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Target
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" target=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithTarget(string? value = null)
|
||||
{
|
||||
Target = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public A WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<A>.Writer => writer;
|
||||
static A IHtmlElement<A>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<A>.IsVoidElement => false;
|
||||
static string IHtmlElement<A>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<A>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"download",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"href",
|
||||
"hreflang",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"media",
|
||||
"ping",
|
||||
"referrerpolicy",
|
||||
"rel",
|
||||
"role",
|
||||
"shape",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"target",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Abbr : IHtmlElement<Abbr>,
|
||||
IGlobalAttributes<Abbr>
|
||||
{
|
||||
private const string ElementName = "abbr";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Abbr(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Abbr WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Abbr>.Writer => writer;
|
||||
static Abbr IHtmlElement<Abbr>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Abbr>.IsVoidElement => false;
|
||||
static string IHtmlElement<Abbr>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Abbr>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Acronym : IHtmlElement<Acronym>,
|
||||
IGlobalAttributes<Acronym>
|
||||
{
|
||||
private const string ElementName = "acronym";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Acronym(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Acronym WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Acronym>.Writer => writer;
|
||||
static Acronym IHtmlElement<Acronym>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Acronym>.IsVoidElement => false;
|
||||
static string IHtmlElement<Acronym>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Acronym>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Address : IHtmlElement<Address>,
|
||||
IGlobalAttributes<Address>
|
||||
{
|
||||
private const string ElementName = "address";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Address(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Address WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Address>.Writer => writer;
|
||||
static Address IHtmlElement<Address>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Address>.IsVoidElement => false;
|
||||
static string IHtmlElement<Address>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Address>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,501 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Area : IHtmlElement<Area>,
|
||||
IAltAttribute<Area>,
|
||||
ICoordsAttribute<Area>,
|
||||
IDownloadAttribute<Area>,
|
||||
IHrefAttribute<Area>,
|
||||
IMediaAttribute<Area>,
|
||||
IPingAttribute<Area>,
|
||||
IReferrerPolicyAttribute<Area>,
|
||||
IRelAttribute<Area>,
|
||||
IShapeAttribute<Area>,
|
||||
ITargetAttribute<Area>,
|
||||
IGlobalAttributes<Area>
|
||||
{
|
||||
private const string ElementName = "area";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Area(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Alt
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" alt=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithAlt(string? value = null)
|
||||
{
|
||||
Alt = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Coords
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" coords=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithCoords(string? value = null)
|
||||
{
|
||||
Coords = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Download
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" download=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithDownload(string? value = null)
|
||||
{
|
||||
Download = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Href
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" href=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithHref(string? value = null)
|
||||
{
|
||||
Href = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Media
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" media=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithMedia(string? value = null)
|
||||
{
|
||||
Media = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Ping
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" ping=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithPing(string? value = null)
|
||||
{
|
||||
Ping = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ReferrerPolicy
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" referrerpolicy=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithReferrerPolicy(string? value = null)
|
||||
{
|
||||
ReferrerPolicy = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Rel
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" rel=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithRel(string? value = null)
|
||||
{
|
||||
Rel = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Shape
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" shape=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithShape(string? value = null)
|
||||
{
|
||||
Shape = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Target
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" target=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithTarget(string? value = null)
|
||||
{
|
||||
Target = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Area WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Area>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Area>.Writer => writer;
|
||||
static Area IHtmlElement<Area>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Area>.IsVoidElement => true;
|
||||
static string IHtmlElement<Area>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Area>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"alt",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"coords",
|
||||
"dir",
|
||||
"download",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"href",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"media",
|
||||
"ping",
|
||||
"referrerpolicy",
|
||||
"rel",
|
||||
"role",
|
||||
"shape",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"target",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Article : IHtmlElement<Article>,
|
||||
IGlobalAttributes<Article>
|
||||
{
|
||||
private const string ElementName = "article";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Article(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Article WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Article>.Writer => writer;
|
||||
static Article IHtmlElement<Article>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Article>.IsVoidElement => false;
|
||||
static string IHtmlElement<Article>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Article>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Aside : IHtmlElement<Aside>,
|
||||
IGlobalAttributes<Aside>
|
||||
{
|
||||
private const string ElementName = "aside";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Aside(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Aside WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Aside>.Writer => writer;
|
||||
static Aside IHtmlElement<Aside>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Aside>.IsVoidElement => false;
|
||||
static string IHtmlElement<Aside>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Aside>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,464 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Audio : IHtmlElement<Audio>,
|
||||
IAutoplayAttribute<Audio>,
|
||||
IControlsAttribute<Audio>,
|
||||
ICrossOriginAttribute<Audio>,
|
||||
ILoopAttribute<Audio>,
|
||||
IMutedAttribute<Audio>,
|
||||
IPreloadAttribute<Audio>,
|
||||
ISrcAttribute<Audio>,
|
||||
IGlobalAttributes<Audio>
|
||||
{
|
||||
private const string ElementName = "audio";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Audio(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autoplay
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autoplay=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithAutoplay(string? value = null)
|
||||
{
|
||||
Autoplay = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Controls
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" controls=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithControls(string? value = null)
|
||||
{
|
||||
Controls = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? CrossOrigin
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" crossorigin=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithCrossOrigin(string? value = null)
|
||||
{
|
||||
CrossOrigin = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Loop
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" loop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithLoop(string? value = null)
|
||||
{
|
||||
Loop = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Muted
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" muted=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithMuted(string? value = null)
|
||||
{
|
||||
Muted = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Preload
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" preload=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithPreload(string? value = null)
|
||||
{
|
||||
Preload = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Src
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" src=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithSrc(string? value = null)
|
||||
{
|
||||
Src = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Audio WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Audio>.Writer => writer;
|
||||
static Audio IHtmlElement<Audio>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Audio>.IsVoidElement => false;
|
||||
static string IHtmlElement<Audio>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Audio>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"autoplay",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"controls",
|
||||
"crossorigin",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"loop",
|
||||
"muted",
|
||||
"preload",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"src",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct B : IHtmlElement<B>,
|
||||
IGlobalAttributes<B>
|
||||
{
|
||||
private const string ElementName = "b";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public B(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public B WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<B>.Writer => writer;
|
||||
static B IHtmlElement<B>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<B>.IsVoidElement => false;
|
||||
static string IHtmlElement<B>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<B>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,357 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Base : IHtmlElement<Base>,
|
||||
IHrefAttribute<Base>,
|
||||
ITargetAttribute<Base>,
|
||||
IGlobalAttributes<Base>
|
||||
{
|
||||
private const string ElementName = "base";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Base(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Href
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" href=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithHref(string? value = null)
|
||||
{
|
||||
Href = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Target
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" target=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithTarget(string? value = null)
|
||||
{
|
||||
Target = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Base WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Base>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Base>.Writer => writer;
|
||||
static Base IHtmlElement<Base>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Base>.IsVoidElement => true;
|
||||
static string IHtmlElement<Base>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Base>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"href",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"target",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Bdi : IHtmlElement<Bdi>,
|
||||
IGlobalAttributes<Bdi>
|
||||
{
|
||||
private const string ElementName = "bdi";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Bdi(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdi WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Bdi>.Writer => writer;
|
||||
static Bdi IHtmlElement<Bdi>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Bdi>.IsVoidElement => false;
|
||||
static string IHtmlElement<Bdi>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Bdi>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Bdo : IHtmlElement<Bdo>,
|
||||
IGlobalAttributes<Bdo>
|
||||
{
|
||||
private const string ElementName = "bdo";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Bdo(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Bdo WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Bdo>.Writer => writer;
|
||||
static Bdo IHtmlElement<Bdo>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Bdo>.IsVoidElement => false;
|
||||
static string IHtmlElement<Bdo>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Bdo>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Big : IHtmlElement<Big>,
|
||||
IGlobalAttributes<Big>
|
||||
{
|
||||
private const string ElementName = "big";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Big(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Big WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Big>.Writer => writer;
|
||||
static Big IHtmlElement<Big>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Big>.IsVoidElement => false;
|
||||
static string IHtmlElement<Big>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Big>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Blockquote : IHtmlElement<Blockquote>,
|
||||
ICiteAttribute<Blockquote>,
|
||||
IGlobalAttributes<Blockquote>
|
||||
{
|
||||
private const string ElementName = "blockquote";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Blockquote(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Cite
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" cite=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithCite(string? value = null)
|
||||
{
|
||||
Cite = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Blockquote WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Blockquote>.Writer => writer;
|
||||
static Blockquote IHtmlElement<Blockquote>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Blockquote>.IsVoidElement => false;
|
||||
static string IHtmlElement<Blockquote>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Blockquote>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"cite",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,374 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Body : IHtmlElement<Body>,
|
||||
IBackgroundAttribute<Body>,
|
||||
IBgColorAttribute<Body>,
|
||||
IGlobalAttributes<Body>
|
||||
{
|
||||
private const string ElementName = "body";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Body(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Background
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" background=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithBackground(string? value = null)
|
||||
{
|
||||
Background = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? BgColor
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" bgcolor=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithBgColor(string? value = null)
|
||||
{
|
||||
BgColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Body WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Body>.Writer => writer;
|
||||
static Body IHtmlElement<Body>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Body>.IsVoidElement => false;
|
||||
static string IHtmlElement<Body>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Body>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"background",
|
||||
"bgcolor",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,321 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Br : IHtmlElement<Br>,
|
||||
IGlobalAttributes<Br>
|
||||
{
|
||||
private const string ElementName = "br";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Br(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Br WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Br>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Br>.Writer => writer;
|
||||
static Br IHtmlElement<Br>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Br>.IsVoidElement => true;
|
||||
static string IHtmlElement<Br>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Br>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,518 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Button : IHtmlElement<Button>,
|
||||
IDisabledAttribute<Button>,
|
||||
IFormAttribute<Button>,
|
||||
IFormActionAttribute<Button>,
|
||||
IFormEncTypeAttribute<Button>,
|
||||
IFormMethodAttribute<Button>,
|
||||
IFormNoValidateAttribute<Button>,
|
||||
IFormTargetAttribute<Button>,
|
||||
INameAttribute<Button>,
|
||||
ITypeAttribute<Button>,
|
||||
IValueAttribute<Button>,
|
||||
IGlobalAttributes<Button>
|
||||
{
|
||||
private const string ElementName = "button";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Button(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Disabled
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" disabled=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithDisabled(string? value = null)
|
||||
{
|
||||
Disabled = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Form
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" form=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithForm(string? value = null)
|
||||
{
|
||||
Form = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? FormAction
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" formaction=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithFormAction(string? value = null)
|
||||
{
|
||||
FormAction = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? FormEncType
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" formenctype=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithFormEncType(string? value = null)
|
||||
{
|
||||
FormEncType = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? FormMethod
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" formmethod=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithFormMethod(string? value = null)
|
||||
{
|
||||
FormMethod = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? FormNoValidate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" formnovalidate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithFormNoValidate(string? value = null)
|
||||
{
|
||||
FormNoValidate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? FormTarget
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" formtarget=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithFormTarget(string? value = null)
|
||||
{
|
||||
FormTarget = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Name
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" name=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithName(string? value = null)
|
||||
{
|
||||
Name = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Type
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" type=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithType(string? value = null)
|
||||
{
|
||||
Type = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Value
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" value=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Button WithValue(string? value = null)
|
||||
{
|
||||
Value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Button>.Writer => writer;
|
||||
static Button IHtmlElement<Button>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Button>.IsVoidElement => false;
|
||||
static string IHtmlElement<Button>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Button>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"disabled",
|
||||
"draggable",
|
||||
"form",
|
||||
"formaction",
|
||||
"formenctype",
|
||||
"formmethod",
|
||||
"formnovalidate",
|
||||
"formtarget",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"name",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
"type",
|
||||
"value",
|
||||
];
|
||||
}
|
||||
@@ -1,374 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Canvas : IHtmlElement<Canvas>,
|
||||
IHeightAttribute<Canvas>,
|
||||
IWidthAttribute<Canvas>,
|
||||
IGlobalAttributes<Canvas>
|
||||
{
|
||||
private const string ElementName = "canvas";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Canvas(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Height
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" height=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithHeight(string? value = null)
|
||||
{
|
||||
Height = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Width
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" width=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Canvas WithWidth(string? value = null)
|
||||
{
|
||||
Width = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Canvas>.Writer => writer;
|
||||
static Canvas IHtmlElement<Canvas>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Canvas>.IsVoidElement => false;
|
||||
static string IHtmlElement<Canvas>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Canvas>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"height",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
"width",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Caption : IHtmlElement<Caption>,
|
||||
IAlignAttribute<Caption>,
|
||||
IGlobalAttributes<Caption>
|
||||
{
|
||||
private const string ElementName = "caption";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Caption(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Align
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" align=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithAlign(string? value = null)
|
||||
{
|
||||
Align = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Caption WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Caption>.Writer => writer;
|
||||
static Caption IHtmlElement<Caption>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Caption>.IsVoidElement => false;
|
||||
static string IHtmlElement<Caption>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Caption>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"align",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Center : IHtmlElement<Center>,
|
||||
IGlobalAttributes<Center>
|
||||
{
|
||||
private const string ElementName = "center";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Center(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Center WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Center>.Writer => writer;
|
||||
static Center IHtmlElement<Center>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Center>.IsVoidElement => false;
|
||||
static string IHtmlElement<Center>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Center>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Cite : IHtmlElement<Cite>,
|
||||
IGlobalAttributes<Cite>
|
||||
{
|
||||
private const string ElementName = "cite";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Cite(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Cite WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Cite>.Writer => writer;
|
||||
static Cite IHtmlElement<Cite>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Cite>.IsVoidElement => false;
|
||||
static string IHtmlElement<Cite>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Cite>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Code : IHtmlElement<Code>,
|
||||
IGlobalAttributes<Code>
|
||||
{
|
||||
private const string ElementName = "code";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Code(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Code WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Code>.Writer => writer;
|
||||
static Code IHtmlElement<Code>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Code>.IsVoidElement => false;
|
||||
static string IHtmlElement<Code>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Code>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,375 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Col : IHtmlElement<Col>,
|
||||
IAlignAttribute<Col>,
|
||||
IBgColorAttribute<Col>,
|
||||
ISpanAttribute<Col>,
|
||||
IGlobalAttributes<Col>
|
||||
{
|
||||
private const string ElementName = "col";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Col(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Align
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" align=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithAlign(string? value = null)
|
||||
{
|
||||
Align = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? BgColor
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" bgcolor=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithBgColor(string? value = null)
|
||||
{
|
||||
BgColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Span
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" span=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithSpan(string? value = null)
|
||||
{
|
||||
Span = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Col WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Col>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Col>.Writer => writer;
|
||||
static Col IHtmlElement<Col>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Col>.IsVoidElement => true;
|
||||
static string IHtmlElement<Col>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Col>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"align",
|
||||
"autocapitalize",
|
||||
"bgcolor",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"span",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Colgroup : IHtmlElement<Colgroup>,
|
||||
IAlignAttribute<Colgroup>,
|
||||
IBgColorAttribute<Colgroup>,
|
||||
ISpanAttribute<Colgroup>,
|
||||
IGlobalAttributes<Colgroup>
|
||||
{
|
||||
private const string ElementName = "colgroup";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Colgroup(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Align
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" align=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithAlign(string? value = null)
|
||||
{
|
||||
Align = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? BgColor
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" bgcolor=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithBgColor(string? value = null)
|
||||
{
|
||||
BgColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Span
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" span=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithSpan(string? value = null)
|
||||
{
|
||||
Span = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Colgroup WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Colgroup>.Writer => writer;
|
||||
static Colgroup IHtmlElement<Colgroup>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Colgroup>.IsVoidElement => false;
|
||||
static string IHtmlElement<Colgroup>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Colgroup>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"align",
|
||||
"autocapitalize",
|
||||
"bgcolor",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"span",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Content : IHtmlElement<Content>,
|
||||
IGlobalAttributes<Content>
|
||||
{
|
||||
private const string ElementName = "content";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Content(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Content WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Content>.Writer => writer;
|
||||
static Content IHtmlElement<Content>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Content>.IsVoidElement => false;
|
||||
static string IHtmlElement<Content>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Content>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Data : IHtmlElement<Data>,
|
||||
IValueAttribute<Data>,
|
||||
IGlobalAttributes<Data>
|
||||
{
|
||||
private const string ElementName = "data";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Data(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Value
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" value=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Data WithValue(string? value = null)
|
||||
{
|
||||
Value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Data>.Writer => writer;
|
||||
static Data IHtmlElement<Data>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Data>.IsVoidElement => false;
|
||||
static string IHtmlElement<Data>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Data>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
"value",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Datalist : IHtmlElement<Datalist>,
|
||||
IGlobalAttributes<Datalist>
|
||||
{
|
||||
private const string ElementName = "datalist";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Datalist(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Datalist WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Datalist>.Writer => writer;
|
||||
static Datalist IHtmlElement<Datalist>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Datalist>.IsVoidElement => false;
|
||||
static string IHtmlElement<Datalist>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Datalist>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dd : IHtmlElement<Dd>,
|
||||
IGlobalAttributes<Dd>
|
||||
{
|
||||
private const string ElementName = "dd";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dd(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dd WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dd>.Writer => writer;
|
||||
static Dd IHtmlElement<Dd>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dd>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dd>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dd>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,374 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Del : IHtmlElement<Del>,
|
||||
ICiteAttribute<Del>,
|
||||
IDateTimeAttribute<Del>,
|
||||
IGlobalAttributes<Del>
|
||||
{
|
||||
private const string ElementName = "del";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Del(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Cite
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" cite=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithCite(string? value = null)
|
||||
{
|
||||
Cite = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? DateTime
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" datetime=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithDateTime(string? value = null)
|
||||
{
|
||||
DateTime = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Del WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Del>.Writer => writer;
|
||||
static Del IHtmlElement<Del>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Del>.IsVoidElement => false;
|
||||
static string IHtmlElement<Del>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Del>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"cite",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"datetime",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Details : IHtmlElement<Details>,
|
||||
IOpenAttribute<Details>,
|
||||
IGlobalAttributes<Details>
|
||||
{
|
||||
private const string ElementName = "details";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Details(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Open
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" open=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithOpen(string? value = null)
|
||||
{
|
||||
Open = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Details WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Details>.Writer => writer;
|
||||
static Details IHtmlElement<Details>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Details>.IsVoidElement => false;
|
||||
static string IHtmlElement<Details>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Details>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"open",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dfn : IHtmlElement<Dfn>,
|
||||
IGlobalAttributes<Dfn>
|
||||
{
|
||||
private const string ElementName = "dfn";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dfn(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dfn WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dfn>.Writer => writer;
|
||||
static Dfn IHtmlElement<Dfn>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dfn>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dfn>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dfn>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dialog : IHtmlElement<Dialog>,
|
||||
IOpenAttribute<Dialog>,
|
||||
IGlobalAttributes<Dialog>
|
||||
{
|
||||
private const string ElementName = "dialog";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dialog(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Open
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" open=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithOpen(string? value = null)
|
||||
{
|
||||
Open = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dialog WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dialog>.Writer => writer;
|
||||
static Dialog IHtmlElement<Dialog>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dialog>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dialog>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dialog>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"open",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,343 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dir : IHtmlElement<Dir>,
|
||||
IGlobalAttributes<Dir>
|
||||
{
|
||||
private const string ElementName = "dir";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dir(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir_
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
string IGlobalAttributes<Dir>.Dir
|
||||
{
|
||||
set => Dir_ = value;
|
||||
}
|
||||
|
||||
public Dir WithDir(string? value = null)
|
||||
{
|
||||
Dir_ = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dir WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dir>.Writer => writer;
|
||||
static Dir IHtmlElement<Dir>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dir>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dir>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dir>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Div : IHtmlElement<Div>,
|
||||
IGlobalAttributes<Div>
|
||||
{
|
||||
private const string ElementName = "div";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Div(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Div WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Div>.Writer => writer;
|
||||
static Div IHtmlElement<Div>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Div>.IsVoidElement => false;
|
||||
static string IHtmlElement<Div>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Div>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dl : IHtmlElement<Dl>,
|
||||
IGlobalAttributes<Dl>
|
||||
{
|
||||
private const string ElementName = "dl";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dl(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dl WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dl>.Writer => writer;
|
||||
static Dl IHtmlElement<Dl>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dl>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dl>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dl>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Dt : IHtmlElement<Dt>,
|
||||
IGlobalAttributes<Dt>
|
||||
{
|
||||
private const string ElementName = "dt";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Dt(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Dt WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Dt>.Writer => writer;
|
||||
static Dt IHtmlElement<Dt>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Dt>.IsVoidElement => false;
|
||||
static string IHtmlElement<Dt>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Dt>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Em : IHtmlElement<Em>,
|
||||
IGlobalAttributes<Em>
|
||||
{
|
||||
private const string ElementName = "em";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Em(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Em WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Em>.Writer => writer;
|
||||
static Em IHtmlElement<Em>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Em>.IsVoidElement => false;
|
||||
static string IHtmlElement<Em>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Em>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,393 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Embed : IHtmlElement<Embed>,
|
||||
IHeightAttribute<Embed>,
|
||||
ISrcAttribute<Embed>,
|
||||
ITypeAttribute<Embed>,
|
||||
IWidthAttribute<Embed>,
|
||||
IGlobalAttributes<Embed>
|
||||
{
|
||||
private const string ElementName = "embed";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Embed(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Height
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" height=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithHeight(string? value = null)
|
||||
{
|
||||
Height = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Src
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" src=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithSrc(string? value = null)
|
||||
{
|
||||
Src = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Type
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" type=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithType(string? value = null)
|
||||
{
|
||||
Type = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Width
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" width=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Embed WithWidth(string? value = null)
|
||||
{
|
||||
Width = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Embed>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Embed>.Writer => writer;
|
||||
static Embed IHtmlElement<Embed>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Embed>.IsVoidElement => true;
|
||||
static string IHtmlElement<Embed>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Embed>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"height",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"src",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
"type",
|
||||
"width",
|
||||
];
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Fieldset : IHtmlElement<Fieldset>,
|
||||
IDisabledAttribute<Fieldset>,
|
||||
IFormAttribute<Fieldset>,
|
||||
INameAttribute<Fieldset>,
|
||||
IGlobalAttributes<Fieldset>
|
||||
{
|
||||
private const string ElementName = "fieldset";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Fieldset(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Disabled
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" disabled=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithDisabled(string? value = null)
|
||||
{
|
||||
Disabled = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Form
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" form=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithForm(string? value = null)
|
||||
{
|
||||
Form = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Name
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" name=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithName(string? value = null)
|
||||
{
|
||||
Name = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Fieldset WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Fieldset>.Writer => writer;
|
||||
static Fieldset IHtmlElement<Fieldset>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Fieldset>.IsVoidElement => false;
|
||||
static string IHtmlElement<Fieldset>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Fieldset>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"disabled",
|
||||
"draggable",
|
||||
"form",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"name",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Figcaption : IHtmlElement<Figcaption>,
|
||||
IGlobalAttributes<Figcaption>
|
||||
{
|
||||
private const string ElementName = "figcaption";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Figcaption(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figcaption WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Figcaption>.Writer => writer;
|
||||
static Figcaption IHtmlElement<Figcaption>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Figcaption>.IsVoidElement => false;
|
||||
static string IHtmlElement<Figcaption>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Figcaption>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Figure : IHtmlElement<Figure>,
|
||||
IGlobalAttributes<Figure>
|
||||
{
|
||||
private const string ElementName = "figure";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Figure(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Figure WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Figure>.Writer => writer;
|
||||
static Figure IHtmlElement<Figure>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Figure>.IsVoidElement => false;
|
||||
static string IHtmlElement<Figure>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Figure>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Font : IHtmlElement<Font>,
|
||||
IColorAttribute<Font>,
|
||||
IGlobalAttributes<Font>
|
||||
{
|
||||
private const string ElementName = "font";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Font(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Color
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" color=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithColor(string? value = null)
|
||||
{
|
||||
Color = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Font WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Font>.Writer => writer;
|
||||
static Font IHtmlElement<Font>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Font>.IsVoidElement => false;
|
||||
static string IHtmlElement<Font>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Font>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"color",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Footer : IHtmlElement<Footer>,
|
||||
IGlobalAttributes<Footer>
|
||||
{
|
||||
private const string ElementName = "footer";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Footer(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Footer WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Footer>.Writer => writer;
|
||||
static Footer IHtmlElement<Footer>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Footer>.IsVoidElement => false;
|
||||
static string IHtmlElement<Footer>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Footer>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,500 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Form : IHtmlElement<Form>,
|
||||
IAcceptAttribute<Form>,
|
||||
IAcceptCharsetAttribute<Form>,
|
||||
IActionAttribute<Form>,
|
||||
IAutocompleteAttribute<Form>,
|
||||
IEnctypeAttribute<Form>,
|
||||
IMethodAttribute<Form>,
|
||||
INameAttribute<Form>,
|
||||
INovalidateAttribute<Form>,
|
||||
ITargetAttribute<Form>,
|
||||
IGlobalAttributes<Form>
|
||||
{
|
||||
private const string ElementName = "form";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Form(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? Accept
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accept=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAccept(string? value = null)
|
||||
{
|
||||
Accept = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? AcceptCharset
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accept-charset=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAcceptCharset(string? value = null)
|
||||
{
|
||||
AcceptCharset = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Action
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" action=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAction(string? value = null)
|
||||
{
|
||||
Action = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocomplete
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocomplete=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithAutocomplete(string? value = null)
|
||||
{
|
||||
Autocomplete = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Enctype
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" enctype=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithEnctype(string? value = null)
|
||||
{
|
||||
Enctype = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Method
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" method=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithMethod(string? value = null)
|
||||
{
|
||||
Method = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Name
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" name=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithName(string? value = null)
|
||||
{
|
||||
Name = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Novalidate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" novalidate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithNovalidate(string? value = null)
|
||||
{
|
||||
Novalidate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Target
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" target=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithTarget(string? value = null)
|
||||
{
|
||||
Target = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Form WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Form>.Writer => writer;
|
||||
static Form IHtmlElement<Form>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Form>.IsVoidElement => false;
|
||||
static string IHtmlElement<Form>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Form>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accept",
|
||||
"accept-charset",
|
||||
"accesskey",
|
||||
"action",
|
||||
"autocapitalize",
|
||||
"autocomplete",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"enctype",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"method",
|
||||
"name",
|
||||
"novalidate",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"target",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Frame : IHtmlElement<Frame>,
|
||||
IGlobalAttributes<Frame>
|
||||
{
|
||||
private const string ElementName = "frame";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Frame(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frame WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Frame>.Writer => writer;
|
||||
static Frame IHtmlElement<Frame>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Frame>.IsVoidElement => false;
|
||||
static string IHtmlElement<Frame>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Frame>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Frameset : IHtmlElement<Frameset>,
|
||||
IGlobalAttributes<Frameset>
|
||||
{
|
||||
private const string ElementName = "frameset";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Frameset(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Frameset WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Frameset>.Writer => writer;
|
||||
static Frameset IHtmlElement<Frameset>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Frameset>.IsVoidElement => false;
|
||||
static string IHtmlElement<Frameset>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Frameset>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H1 : IHtmlElement<H1>,
|
||||
IGlobalAttributes<H1>
|
||||
{
|
||||
private const string ElementName = "h1";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H1(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H1 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H1>.Writer => writer;
|
||||
static H1 IHtmlElement<H1>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H1>.IsVoidElement => false;
|
||||
static string IHtmlElement<H1>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H1>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H2 : IHtmlElement<H2>,
|
||||
IGlobalAttributes<H2>
|
||||
{
|
||||
private const string ElementName = "h2";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H2(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H2 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H2>.Writer => writer;
|
||||
static H2 IHtmlElement<H2>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H2>.IsVoidElement => false;
|
||||
static string IHtmlElement<H2>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H2>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H3 : IHtmlElement<H3>,
|
||||
IGlobalAttributes<H3>
|
||||
{
|
||||
private const string ElementName = "h3";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H3(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H3 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H3>.Writer => writer;
|
||||
static H3 IHtmlElement<H3>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H3>.IsVoidElement => false;
|
||||
static string IHtmlElement<H3>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H3>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H4 : IHtmlElement<H4>,
|
||||
IGlobalAttributes<H4>
|
||||
{
|
||||
private const string ElementName = "h4";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H4(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H4 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H4>.Writer => writer;
|
||||
static H4 IHtmlElement<H4>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H4>.IsVoidElement => false;
|
||||
static string IHtmlElement<H4>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H4>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H5 : IHtmlElement<H5>,
|
||||
IGlobalAttributes<H5>
|
||||
{
|
||||
private const string ElementName = "h5";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H5(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H5 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H5>.Writer => writer;
|
||||
static H5 IHtmlElement<H5>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H5>.IsVoidElement => false;
|
||||
static string IHtmlElement<H5>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H5>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct H6 : IHtmlElement<H6>,
|
||||
IGlobalAttributes<H6>
|
||||
{
|
||||
private const string ElementName = "h6";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public H6(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public H6 WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<H6>.Writer => writer;
|
||||
static H6 IHtmlElement<H6>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<H6>.IsVoidElement => false;
|
||||
static string IHtmlElement<H6>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<H6>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Head : IHtmlElement<Head>,
|
||||
IGlobalAttributes<Head>
|
||||
{
|
||||
private const string ElementName = "head";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Head(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Head WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Head>.Writer => writer;
|
||||
static Head IHtmlElement<Head>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Head>.IsVoidElement => false;
|
||||
static string IHtmlElement<Head>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Head>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Header : IHtmlElement<Header>,
|
||||
IGlobalAttributes<Header>
|
||||
{
|
||||
private const string ElementName = "header";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Header(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Header WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Header>.Writer => writer;
|
||||
static Header IHtmlElement<Header>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Header>.IsVoidElement => false;
|
||||
static string IHtmlElement<Header>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Header>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Hgroup : IHtmlElement<Hgroup>,
|
||||
IGlobalAttributes<Hgroup>
|
||||
{
|
||||
private const string ElementName = "hgroup";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Hgroup(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hgroup WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Hgroup>.Writer => writer;
|
||||
static Hgroup IHtmlElement<Hgroup>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Hgroup>.IsVoidElement => false;
|
||||
static string IHtmlElement<Hgroup>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Hgroup>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,357 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Hr : IHtmlElement<Hr>,
|
||||
IAlignAttribute<Hr>,
|
||||
IColorAttribute<Hr>,
|
||||
IGlobalAttributes<Hr>
|
||||
{
|
||||
private const string ElementName = "hr";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Hr(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Align
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" align=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithAlign(string? value = null)
|
||||
{
|
||||
Align = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Color
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" color=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithColor(string? value = null)
|
||||
{
|
||||
Color = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Hr WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write("/>");
|
||||
|
||||
HtmlElementCloser IHtmlElement<Hr>.End() => throw new NotSupportedException();
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Hr>.Writer => writer;
|
||||
static Hr IHtmlElement<Hr>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Hr>.IsVoidElement => true;
|
||||
static string IHtmlElement<Hr>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Hr>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"align",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"color",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct Html : IHtmlElement<Html>,
|
||||
IGlobalAttributes<Html>
|
||||
{
|
||||
private const string ElementName = "html";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public Html(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public Html WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<Html>.Writer => writer;
|
||||
static Html IHtmlElement<Html>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<Html>.IsVoidElement => false;
|
||||
static string IHtmlElement<Html>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<Html>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public readonly ref partial struct I : IHtmlElement<I>,
|
||||
IGlobalAttributes<I>
|
||||
{
|
||||
private const string ElementName = "i";
|
||||
private readonly TextWriter writer;
|
||||
|
||||
public I(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
writer.Write($"<{ElementName}");
|
||||
}
|
||||
|
||||
public string? AccessKey
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" accesskey=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithAccessKey(string? value = null)
|
||||
{
|
||||
AccessKey = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Autocapitalize
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" autocapitalize=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithAutocapitalize(string? value = null)
|
||||
{
|
||||
Autocapitalize = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Class
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" class=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithClass(string? value = null)
|
||||
{
|
||||
Class = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ContentEditable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" contenteditable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithContentEditable(string? value = null)
|
||||
{
|
||||
ContentEditable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Dir
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" dir=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithDir(string? value = null)
|
||||
{
|
||||
Dir = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Draggable
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" draggable=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithDraggable(string? value = null)
|
||||
{
|
||||
Draggable = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Hidden
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" hidden=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithHidden(string? value = null)
|
||||
{
|
||||
Hidden = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Id
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" id=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithId(string? value = null)
|
||||
{
|
||||
Id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? ItemProp
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" itemprop=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithItemProp(string? value = null)
|
||||
{
|
||||
ItemProp = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Lang
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" lang=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithLang(string? value = null)
|
||||
{
|
||||
Lang = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Role
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" role=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithRole(string? value = null)
|
||||
{
|
||||
Role = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Slot
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" slot=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithSlot(string? value = null)
|
||||
{
|
||||
Slot = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? SpellCheck
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" spellcheck=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithSpellCheck(string? value = null)
|
||||
{
|
||||
SpellCheck = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Style
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" style=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithStyle(string? value = null)
|
||||
{
|
||||
Style = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" tabindex=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithTabIndex(string? value = null)
|
||||
{
|
||||
TabIndex = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" title=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithTitle(string? value = null)
|
||||
{
|
||||
Title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public string? Translate
|
||||
{
|
||||
set
|
||||
{
|
||||
writer.Write(" translate=\"");
|
||||
writer.Write(value);
|
||||
writer.Write('"');
|
||||
}
|
||||
}
|
||||
|
||||
public I WithTranslate(string? value = null)
|
||||
{
|
||||
Translate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Close() => writer.Write($"></{ElementName}>");
|
||||
|
||||
/// <summary>
|
||||
/// End the opening tag, write some text, and write the closing tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text is automatically Html-encoded.
|
||||
/// </remarks>
|
||||
public void Close(string? text)
|
||||
{
|
||||
writer.Write('>');
|
||||
global::System.Net.WebUtility.HtmlEncode(text, writer);
|
||||
writer.Write($"</{ElementName}>");
|
||||
}
|
||||
|
||||
public HtmlElementCloser End()
|
||||
{
|
||||
writer.Write('>');
|
||||
return new HtmlElementCloser(writer, $"</{ElementName}>");
|
||||
}
|
||||
|
||||
// IHtmlElement<TSelf> implementation
|
||||
TextWriter IHtmlElement<I>.Writer => writer;
|
||||
static I IHtmlElement<I>.Create(TextWriter writer) => new(writer);
|
||||
static bool IHtmlElement<I>.IsVoidElement => false;
|
||||
static string IHtmlElement<I>.Name => ElementName;
|
||||
static ReadOnlySpan<string> IHtmlElement<I>.SupportedAttributes => _supportedAttributes;
|
||||
private static readonly string[] _supportedAttributes =
|
||||
[
|
||||
"accesskey",
|
||||
"autocapitalize",
|
||||
"class",
|
||||
"contenteditable",
|
||||
"dir",
|
||||
"draggable",
|
||||
"hidden",
|
||||
"id",
|
||||
"itemprop",
|
||||
"lang",
|
||||
"role",
|
||||
"slot",
|
||||
"spellcheck",
|
||||
"style",
|
||||
"tabindex",
|
||||
"title",
|
||||
"translate",
|
||||
];
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAcceptAttribute<TSelf> where TSelf : IAcceptAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Accept { set; }
|
||||
|
||||
TSelf WithAccept(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAcceptCharsetAttribute<TSelf> where TSelf : IAcceptCharsetAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string AcceptCharset { set; }
|
||||
|
||||
TSelf WithAcceptCharset(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IActionAttribute<TSelf> where TSelf : IActionAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Action { set; }
|
||||
|
||||
TSelf WithAction(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAlignAttribute<TSelf> where TSelf : IAlignAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Align { set; }
|
||||
|
||||
TSelf WithAlign(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAllowAttribute<TSelf> where TSelf : IAllowAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Allow { set; }
|
||||
|
||||
TSelf WithAllow(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAltAttribute<TSelf> where TSelf : IAltAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Alt { set; }
|
||||
|
||||
TSelf WithAlt(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAsAttribute<TSelf> where TSelf : IAsAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string As { set; }
|
||||
|
||||
TSelf WithAs(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAsyncAttribute<TSelf> where TSelf : IAsyncAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Async { set; }
|
||||
|
||||
TSelf WithAsync(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAutocompleteAttribute<TSelf> where TSelf : IAutocompleteAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Autocomplete { set; }
|
||||
|
||||
TSelf WithAutocomplete(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IAutoplayAttribute<TSelf> where TSelf : IAutoplayAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Autoplay { set; }
|
||||
|
||||
TSelf WithAutoplay(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IBackgroundAttribute<TSelf> where TSelf : IBackgroundAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Background { set; }
|
||||
|
||||
TSelf WithBackground(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IBgColorAttribute<TSelf> where TSelf : IBgColorAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string BgColor { set; }
|
||||
|
||||
TSelf WithBgColor(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IBorderAttribute<TSelf> where TSelf : IBorderAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Border { set; }
|
||||
|
||||
TSelf WithBorder(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICaptureAttribute<TSelf> where TSelf : ICaptureAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Capture { set; }
|
||||
|
||||
TSelf WithCapture(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICharsetAttribute<TSelf> where TSelf : ICharsetAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Charset { set; }
|
||||
|
||||
TSelf WithCharset(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICheckedAttribute<TSelf> where TSelf : ICheckedAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Checked { set; }
|
||||
|
||||
TSelf WithChecked(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICiteAttribute<TSelf> where TSelf : ICiteAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Cite { set; }
|
||||
|
||||
TSelf WithCite(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IColSpanAttribute<TSelf> where TSelf : IColSpanAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string ColSpan { set; }
|
||||
|
||||
TSelf WithColSpan(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IColorAttribute<TSelf> where TSelf : IColorAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Color { set; }
|
||||
|
||||
TSelf WithColor(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IColsAttribute<TSelf> where TSelf : IColsAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Cols { set; }
|
||||
|
||||
TSelf WithCols(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IContentAttribute<TSelf> where TSelf : IContentAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Content { set; }
|
||||
|
||||
TSelf WithContent(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface IControlsAttribute<TSelf> where TSelf : IControlsAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Controls { set; }
|
||||
|
||||
TSelf WithControls(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICoordsAttribute<TSelf> where TSelf : ICoordsAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string Coords { set; }
|
||||
|
||||
TSelf WithCoords(string? value = null);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Auto-generated code. Do not modify manually.
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace AssetRipper.Text.Html;
|
||||
|
||||
public interface ICrossOriginAttribute<TSelf> where TSelf : ICrossOriginAttribute<TSelf>, allows ref struct
|
||||
{
|
||||
string CrossOrigin { set; }
|
||||
|
||||
TSelf WithCrossOrigin(string? value = null);
|
||||
}
|
||||
Loaded 100 of 262 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user