Removed Unnecessary usings and comments

This commit is contained in:
2026-05-03 23:46:03 +05:00
parent 7778a94cf5
commit 277a65c6c7
4 changed files with 2 additions and 26 deletions
+1 -1
View File
@@ -5,5 +5,5 @@ namespace Htmx.ApiDemo;
[JsonSerializable(typeof(string))]
internal partial class AppJsonSerializerContext : JsonSerializerContext
{
}
-6
View File
@@ -1,9 +1,3 @@
using System.Text.Json.Serialization;
using Htmx.ApiDemo.Templates;
using Microsoft.AspNetCore.Http.HttpResults;
using Immediate.Apis;
using Immediate.Apis.Shared;
using Immediate.Handlers.Shared;
using Htmx.ApiDemo;
var builder = WebApplication.CreateSlimBuilder(args);
-5
View File
@@ -1,8 +1,3 @@
using Htmx.ApiDemo;
using Immediate.Apis;
using Immediate.Apis.Shared;
using Immediate.Handlers.Shared;
namespace Htmx.ApiDemo.Templates;
public class Greeting : GreetingBase
+1 -14
View File
@@ -1,14 +1,4 @@
using System;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Text;
namespace Htmx.SourceGenerator
namespace Htmx.SourceGenerator
{
[Generator]
public class HtmxGenerator : IIncrementalGenerator
@@ -138,7 +128,6 @@ public static class HtmxGeneratedExtensions
var variables = data.Segments.Where(s => !s.IsStatic).Select(s => s.Value).Distinct();
foreach (var v in variables)
{
// Passing context allows user to write direct spans OR nested components
sb.AppendLine($" protected abstract void Render{v}(HtmxRenderContext context);");
}
@@ -160,7 +149,6 @@ public static class HtmxGeneratedExtensions
if (segment.IsStatic)
sb.AppendLine($" context.Writer.WriteUtf8(_part{sIdx++});");
else
// context.Next() enforces the depth limit before calling the user implementation
sb.AppendLine($" Render{segment.Value}(context.Next());");
}
@@ -200,6 +188,5 @@ public static class HtmxGeneratedExtensions
namespace System.Runtime.CompilerServices
{
// Required for records/init properties in netstandard2.0
internal static class IsExternalInit { }
}