Skip to content

Commit

Permalink
Change all public types in namespace Cysharp.Text to internal
Browse files Browse the repository at this point in the history
* Regression caused by axuno#368
* Stop namespace collision with Cysharp.Text nuget package
* Affects: class, struct, interface, delegate, enum
* using https://github.com/zzzprojects/findandreplace on command line, so we can automate this step:
"fnr.exe" --cl --dir "SmartFormat.ZString\repo\src\ZString" --fileMask "*.cs,*.tt" --includeSubDirectories --caseSensitive --useRegEx --find "public (?=.*(class |struct |enum |interface |delegate ))" --replace "internal "
  • Loading branch information
axunonb committed Jan 29, 2024
1 parent d217ceb commit b8a10c0
Show file tree
Hide file tree
Showing 35 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/SmartFormat.ZString/repo/src/ZString/FormatParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal static class FormatParser
{
// {index[,alignment][:formatString]}

public readonly ref struct ParseResult
internal readonly ref struct ParseResult
{
public readonly int Index;
public readonly ReadOnlySpan<char> FormatString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Cysharp.Text
{
public interface IResettableBufferWriter<T> : IBufferWriter<T>
internal interface IResettableBufferWriter<T> : IBufferWriter<T>
{
void Reset();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace System.Numerics
/// The methods use hardware intrinsics when available on the underlying platform,
/// otherwise they use optimized software fallbacks.
/// </summary>
public static class BitOperations
internal static class BitOperations
{
// C# no-alloc optimization that directly wraps the data section of the dll (similar to string constants)
// https://github.com/dotnet/roslyn/pull/24621
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace System
{
internal static class HexConverter
{
public enum Casing : uint
internal enum Casing : uint
{
// Output [ '0' .. '9' ] and [ 'A' .. 'F' ].
Upper = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static unsafe int SingleToInt32Bits(float value)
return *((int*)&value);
}

public readonly struct FloatingPointInfo
internal readonly struct FloatingPointInfo
{
public static readonly FloatingPointInfo Double = new FloatingPointInfo(
denormalMantissaBits: 52,
Expand Down
64 changes: 32 additions & 32 deletions src/SmartFormat.ZString/repo/src/ZString/PreparedFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Cysharp.Text
{
public sealed partial class Utf16PreparedFormat<T1>
internal sealed partial class Utf16PreparedFormat<T1>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -69,7 +69,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1)
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2>
internal sealed partial class Utf16PreparedFormat<T1, T2>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -139,7 +139,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2)
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -214,7 +214,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -294,7 +294,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -379,7 +379,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -469,7 +469,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -564,7 +564,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -664,7 +664,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -769,7 +769,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -879,7 +879,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -994,7 +994,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1114,7 +1114,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1239,7 +1239,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1369,7 +1369,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1504,7 +1504,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
internal sealed partial class Utf16PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1644,7 +1644,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1>
internal sealed partial class Utf8PreparedFormat<T1>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1710,7 +1710,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1)
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2>
internal sealed partial class Utf8PreparedFormat<T1, T2>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1781,7 +1781,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2)
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1857,7 +1857,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -1938,7 +1938,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2024,7 +2024,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2115,7 +2115,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2211,7 +2211,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2312,7 +2312,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2418,7 +2418,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2529,7 +2529,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2645,7 +2645,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2766,7 +2766,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -2892,7 +2892,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -3023,7 +3023,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down Expand Up @@ -3159,7 +3159,7 @@ public void FormatTo<TBufferWriter>(ref TBufferWriter sb, T1 arg1, T2 arg2, T3 a
}
}
}
public sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
internal sealed partial class Utf8PreparedFormat<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/SmartFormat.ZString/repo/src/ZString/PreparedFormat.tt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Cysharp.Text
{
<# foreach(var utf in utfTypes) { var isUtf16 = (utf == "Utf16"); #>
<# for(var i = 1; i <= TypeParamMax; i++) { #>
public sealed partial class <#= utf #>PreparedFormat<<#= CreateTypeArgument(i) #>>
internal sealed partial class <#= utf #>PreparedFormat<<#= CreateTypeArgument(i) #>>
{
public string FormatString { get; }
public int MinSize { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Cysharp.Text
{
public partial struct Utf16ValueStringBuilder
internal partial struct Utf16ValueStringBuilder
{
/// <summary>
/// Concatenates the string representations of the elements in the provided array of objects, using the specified char separator between each member, then appends the result to the current instance of the string builder.
Expand Down Expand Up @@ -209,7 +209,7 @@ internal void AppendJoinInternal<T>(ReadOnlySpan<char> separator, IEnumerable<T>
}
}
}
public partial struct Utf8ValueStringBuilder
internal partial struct Utf8ValueStringBuilder
{
/// <summary>
/// Concatenates the string representations of the elements in the provided array of objects, using the specified char separator between each member, then appends the result to the current instance of the string builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using System.Runtime.CompilerServices;
namespace Cysharp.Text
{
<# foreach(var utf in utfTypes) { #>
public partial struct <#= utf #>ValueStringBuilder
internal partial struct <#= utf #>ValueStringBuilder
{
/// <summary>
/// Concatenates the string representations of the elements in the provided array of objects, using the specified char separator between each member, then appends the result to the current instance of the string builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Cysharp.Text
{
public static partial class TextMeshProExtensions
internal static partial class TextMeshProExtensions
{
public static void SetText<T>(this TMP_Text text, T arg0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using TMPro;

namespace Cysharp.Text
{
public static partial class TextMeshProExtensions
internal static partial class TextMeshProExtensions
{
public static void SetText<T>(this TMP_Text text, T arg0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Cysharp.Text
{
public partial struct Utf16ValueStringBuilder
internal partial struct Utf16ValueStringBuilder
{
/// <summary>Appends the string returned by processing a composite format string, each format item is replaced by the string representation of arguments.</summary>
public void AppendFormat<T1>(string format, T1 arg1)
Expand Down
Loading

0 comments on commit b8a10c0

Please sign in to comment.