Skip to content

Commit 7758c66

Browse files
committed
Removed outcommented code.
1 parent 5b5caf0 commit 7758c66

File tree

2 files changed

+0
-189
lines changed

2 files changed

+0
-189
lines changed

DomainModeling/Conversions/ValueWrapperFormattingExtensions.cs

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
[EditorBrowsable(EditorBrowsableState.Never)]
2424
public static class ArchitectDomainModelingValueWrapperFormattingExtensions
2525
{
26-
// #TODO: Remove outcommented!!! And simplify region names, if need regions at all.
27-
#region IFormattable - Preferred
28-
2926
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
3027
where TWrapper : IFormattable, IValueWrapper<TWrapper, TValue>
3128
{
@@ -40,41 +37,6 @@ public string ToString(string? format, IFormatProvider? formatProvider)
4037
}
4138
}
4239

43-
#endregion
44-
45-
//#region IFormattable - String
46-
47-
//extension<TWrapper>(IValueWrapper<TWrapper, string> wrapper)
48-
// where TWrapper : IFormattable, IValueWrapper<TWrapper, string>
49-
//{
50-
// public string ToString(string? format, IFormatProvider? formatProvider)
51-
// {
52-
// return ((TWrapper)wrapper).ToString(format, formatProvider);
53-
// }
54-
//}
55-
56-
//#endregion
57-
58-
// #region IFormattable - Without IFormattable underlying value
59-
60-
// extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
61-
// where TWrapper : ISpanFormattable, IValueWrapper<TWrapper, TValue>
62-
// {
63-
//#pragma warning disable IDE0060 // Remove unused parameter -- Required for less-preferred overload resolution
64-
// [Obsolete("This type must manually implement IFormattable, since the wrapped underlying type does not implement IFormattable.", error: true)]
65-
// [OverloadResolutionPriority(Int32.MinValue)]
66-
// public string ToString(string? format, IFormatProvider? formatProvider,
67-
// [CallerLineNumber] int callerLineNumber = -1)
68-
// {
69-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support formatting.");
70-
// }
71-
//#pragma warning restore IDE0060 // Remove unused parameter
72-
// }
73-
74-
// #endregion
75-
76-
#region ISpanFormattable - Preferred
77-
7840
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
7941
where TWrapper : ISpanFormattable, IValueWrapper<TWrapper, TValue>
8042
{
@@ -85,41 +47,6 @@ public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan
8547
}
8648
}
8749

88-
#endregion
89-
90-
//#region ISpanFormattable - String
91-
92-
//extension<TWrapper>(IValueWrapper<TWrapper, string> wrapper)
93-
// where TWrapper : ISpanFormattable, IValueWrapper<TWrapper, string>
94-
//{
95-
// public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
96-
// {
97-
// return ((TWrapper)wrapper).TryFormat(destination, out charsWritten, format, provider);
98-
// }
99-
//}
100-
101-
//#endregion
102-
103-
// #region ISpanFormattable - Without ISpanFormattable underlying value
104-
105-
// extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
106-
// where TWrapper : ISpanFormattable, IValueWrapper<TWrapper, TValue>
107-
// {
108-
//#pragma warning disable IDE0060 // Remove unused parameter -- Required for less-preferred overload resolution
109-
// [Obsolete("This type must manually implement ISpanFormattable, since the wrapped underlying type does not implement ISpanFormattable.", error: true)]
110-
// [OverloadResolutionPriority(Int32.MinValue)]
111-
// public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider,
112-
// [CallerLineNumber] int callerLineNumber = -1)
113-
// {
114-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support span formatting.");
115-
// }
116-
//#pragma warning restore IDE0060 // Remove unused parameter
117-
// }
118-
119-
// #endregion
120-
121-
#region IUtf8SpanFormattable - Preferred
122-
12350
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
12451
where TWrapper : IUtf8SpanFormattable, IValueWrapper<TWrapper, TValue>
12552
{
@@ -129,39 +56,6 @@ public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnly
12956
return ((TWrapper)wrapper).TryFormat(utf8Destination, out bytesWritten, format, provider);
13057
}
13158
}
132-
133-
#endregion
134-
135-
//#region IUtf8SpanFormattable - String
136-
137-
//extension<TWrapper>(IValueWrapper<TWrapper, string> wrapper)
138-
// where TWrapper : IUtf8SpanFormattable, IValueWrapper<TWrapper, string>
139-
//{
140-
// public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
141-
// {
142-
// return ((TWrapper)wrapper).TryFormat(utf8Destination, out bytesWritten, format, provider);
143-
// }
144-
//}
145-
146-
//#endregion
147-
148-
// #region IUtf8SpanFormattable - Without IUtf8SpanFormattable underlying value
149-
150-
// extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
151-
// where TWrapper : IUtf8SpanFormattable, IValueWrapper<TWrapper, TValue>
152-
// {
153-
//#pragma warning disable IDE0060 // Remove unused parameter -- Required for less-preferred overload resolution
154-
// [Obsolete("This type must manually implement IUtf8SpanFormattable, since the wrapped underlying type does not implement IUtf8SpanFormattable.", error: true)]
155-
// [OverloadResolutionPriority(Int32.MinValue)]
156-
// public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider,
157-
// [CallerLineNumber] int callerLineNumber = -1)
158-
// {
159-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support UTF-8 span formatting.");
160-
// }
161-
//#pragma warning restore IDE0060 // Remove unused parameter
162-
// }
163-
164-
// #endregion
16559
}
16660

16761
#endif

DomainModeling/Conversions/ValueWrapperParsingExtensions.cs

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
[EditorBrowsable(EditorBrowsableState.Never)]
2323
public static class ArchitectDomainModelingValueWrapperParsingExtensions
2424
{
25-
// #TODO: Remove outcommented!!! And simplify region names, if need regions at all.
26-
#region IParsable - Preferred
27-
2825
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
2926
where TWrapper : IParsable<TWrapper>, IValueWrapper<TWrapper, TValue>
3027
{
@@ -43,10 +40,6 @@ public static TWrapper Parse(string s, IFormatProvider? provider)
4340
}
4441
}
4542

46-
#endregion
47-
48-
#region ISpanParsable - Preferred
49-
5043
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
5144
where TWrapper : ISpanParsable<TWrapper>, IValueWrapper<TWrapper, TValue>
5245
{
@@ -63,36 +56,6 @@ public static TWrapper Parse(ReadOnlySpan<char> s, IFormatProvider? provider)
6356
}
6457
}
6558

66-
#endregion
67-
68-
// #region ISpanParsable - Without ISpanParsable underlying value
69-
70-
// extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
71-
// where TWrapper : ISpanParsable<TWrapper>, IValueWrapper<TWrapper, TValue>
72-
// {
73-
//#pragma warning disable IDE0060 // Remove unused parameter -- Required for less-preferred overload resolution
74-
// [Obsolete("This type must manually implement ISpanParsable<T>, since the wrapped underlying type does not implement ISpanParsable<T>.", error: true)]
75-
// [OverloadResolutionPriority(Int32.MinValue)]
76-
// public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, [MaybeNullWhen(false)] out TWrapper result,
77-
// [CallerLineNumber] int callerLineNumber = -1)
78-
// {
79-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support span parsing.");
80-
// }
81-
82-
// [Obsolete("ISpanParsable<T> was not properly implemented on this type.", error: true)]
83-
// [OverloadResolutionPriority(Int32.MinValue)]
84-
// public static TWrapper Parse(ReadOnlySpan<char> s, IFormatProvider? provider,
85-
// [CallerLineNumber] int callerLineNumber = -1)
86-
// {
87-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support span parsing.");
88-
// }
89-
//#pragma warning restore IDE0060 // Remove unused parameter
90-
// }
91-
92-
// #endregion
93-
94-
#region IUtf8SpanParsable - Preferred
95-
9659
extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
9760
where TWrapper : IUtf8SpanParsable<TWrapper>, IValueWrapper<TWrapper, TValue>
9861
{
@@ -108,52 +71,6 @@ public static TWrapper Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provi
10871
return TWrapper.Parse(utf8Text, provider);
10972
}
11073
}
111-
112-
#endregion
113-
114-
//#region IUtf8SpanParsable - String
115-
116-
//extension<TWrapper>(IValueWrapper<TWrapper, string> wrapper)
117-
// where TWrapper : IUtf8SpanParsable<TWrapper>, IValueWrapper<TWrapper, string>
118-
//{
119-
// public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [MaybeNullWhen(false)] out TWrapper result)
120-
// {
121-
// return TWrapper.TryParse(utf8Text, provider, out result);
122-
// }
123-
124-
// public static TWrapper Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider)
125-
// {
126-
// return TWrapper.Parse(utf8Text, provider);
127-
// }
128-
//}
129-
130-
//#endregion
131-
132-
// #region IUtf8SpanParsable - Without IUtf8SpanParsable underlying value
133-
134-
// extension<TWrapper, TValue>(IValueWrapper<TWrapper, TValue> wrapper)
135-
// where TWrapper : IUtf8SpanParsable<TWrapper>, IValueWrapper<TWrapper, TValue>
136-
// {
137-
//#pragma warning disable IDE0060 // Remove unused parameter -- Required for less-preferred overload resolution
138-
// [Obsolete("This type must manually implement IUtf8SpanParsable<T>, since the wrapped underlying type does not implement IUtf8SpanParsable<T>.", error: true)]
139-
// [OverloadResolutionPriority(Int32.MinValue)]
140-
// public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [MaybeNullWhen(false)] out TWrapper result,
141-
// [CallerLineNumber] int callerLineNumber = -1)
142-
// {
143-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support UTF-8 span parsing.");
144-
// }
145-
146-
// [Obsolete("This type must manually implement IUtf8SpanParsable<T>, since the wrapped underlying type does not implement IUtf8SpanParsable<T>.", error: true)]
147-
// [OverloadResolutionPriority(Int32.MinValue)]
148-
// public static TWrapper Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider,
149-
// [CallerLineNumber] int callerLineNumber = -1)
150-
// {
151-
// throw new NotSupportedException($"Type {typeof(TWrapper).Name} does not support UTF-8 span parsing.");
152-
// }
153-
//#pragma warning restore IDE0060 // Remove unused parameter
154-
// }
155-
156-
// #endregion
15774
}
15875

15976
#endif

0 commit comments

Comments
 (0)