Skip to content

Commit

Permalink
修改命名
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Sep 18, 2024
1 parent 9b51266 commit 72dca6b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/dotnetCampus.Logger/LoggerInterpolatedStringHandler.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ public LoggerInterpolatedStringHandler(int literalLength, int formattedCount)

public void AppendLiteral(string s)
{
ref var handle = ref _handler;
handle.AppendLiteral(s);
ref var handler = ref _handler;
handler.AppendLiteral(s);
}

public void AppendFormatted<T>(T value)
{
ref var handle = ref _handler;
handle.AppendFormatted(value);
ref var handler = ref _handler;
handler.AppendFormatted(value);
}

public void AppendFormatted<T>(T value, string format)
{
ref var handle = ref _handler;
handle.AppendFormatted(value, format);
ref var handler = ref _handler;
handler.AppendFormatted(value, format);
}

public string ToStringAndClear()
Expand All @@ -39,8 +39,8 @@ public string ToStringAndClear()

public override string ToString()
{
ref var handle = ref _handler;
return handle.ToString();
ref var handler = ref _handler;
return handler.ToString();
}

/// <summary>
Expand All @@ -50,8 +50,8 @@ public void Discard()
{
// 这里的 ToStringAndClear 其实只是取其 Clear 的功能
// 暂时先使用 DefaultInterpolatedStringHandler 提供的能力,后续再考虑是否需要优化
ref var handle = ref _handler;
handle.ToStringAndClear();
ref var handler = ref _handler;
handler.ToStringAndClear();
}
}

Expand Down

0 comments on commit 72dca6b

Please sign in to comment.