Skip to content

Commit

Permalink
Add comments on removed template code on apply
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Dec 21, 2024
1 parent 7ff3418 commit 5be33df
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ file partial record struct TSelf(TValue Value)
public static explicit operator TSelf(TValue value) => new(value);
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue;
```

Expand Down Expand Up @@ -294,6 +295,7 @@ file partial record struct TSelf(TValue Value) : IComparable<TSelf>
public static bool operator >=(TSelf left, TSelf right) => left.Value.CompareTo(right.Value) >= 0;
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue : IComparable<TValue>
{
public int CompareTo(TValue other) => throw new NotImplementedException();
Expand Down
1 change: 1 addition & 0 deletions src/StructId/Templates/Comparable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ file partial record struct TSelf(TValue Value) : IComparable<TSelf>
public static bool operator >=(TSelf left, TSelf right) => left.Value.CompareTo(right.Value) >= 0;
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue : IComparable<TValue>
{
public int CompareTo(TValue other) => throw new NotImplementedException();
Expand Down
1 change: 1 addition & 0 deletions src/StructId/Templates/ConversionT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ file partial record struct TSelf(TValue Value)
public static explicit operator TSelf(TValue value) => new(value);
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue;
1 change: 1 addition & 0 deletions src/StructId/Templates/EntityFrameworkValueConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public TValue_ValueConverter(ConverterMappingHints? mappingHints = null)
: base(id => id.ToString(null, null), value => TValue.Parse(value, null), mappingHints) { }
}

// This will be removed when applying the template to each user-defined struct id.
file partial struct TValue : IParsable<TValue>, IFormattable
{
public static TValue Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
Expand Down
1 change: 1 addition & 0 deletions src/StructId/Templates/NewableT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ file partial record struct TSelf(TValue Value) : INewable<TSelf, TValue>
public static TSelf New(TValue value) => new(value);
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue;
1 change: 1 addition & 0 deletions src/StructId/Templates/ParsableT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? prov
}
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue : IParsable<TValue>
{
public static TValue Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
Expand Down
1 change: 1 addition & 0 deletions src/StructId/Templates/SpanFormattable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public readonly bool TryFormat(Span<char> destination, out int charsWritten, Rea
=> ((ISpanFormattable)Value).TryFormat(destination, out charsWritten, format, provider);
}

// This will be removed when applying the template to each user-defined struct id.
file partial record struct TSelf
{
// This partial is provided by Formattable template
Expand Down
2 changes: 2 additions & 0 deletions src/StructId/Templates/SpanParsable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ public static bool TryParse(ReadOnlySpan<char> input, IFormatProvider? provider,
}
}

// This will be removed when applying the template to each user-defined struct id.
file partial record struct TSelf
{
public static TSelf Parse(string s, IFormatProvider? provider) => throw new NotImplementedException();
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [MaybeNullWhen(false)] out TSelf result) => throw new NotImplementedException();
}

// This will be removed when applying the template to each user-defined struct id.
file record struct TValue : ISpanParsable<TValue>
{
public static TValue Parse(ReadOnlySpan<char> s, IFormatProvider? provider) => throw new NotImplementedException();
Expand Down

0 comments on commit 5be33df

Please sign in to comment.