Skip to content

Commit bacf186

Browse files
Run MilCodeGen for WindowsBase (#10433)
Contributes to #10429
1 parent 23c6b65 commit bacf186

18 files changed

+129
-38
lines changed

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/Int32RectValueSerializer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,7 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
13+
using System.ComponentModel;
14+
using System.Globalization;
1215
using System.Windows.Markup;
16+
using System.Windows.Converters;
1317

1418
namespace System.Windows.Converters
1519
{
@@ -39,7 +43,7 @@ public override bool CanConvertToString(object value, IValueSerializerContext co
3943
}
4044

4145
return true;
42-
}
46+
}
4347

4448
/// <summary>
4549
/// Converts a string into a Int32Rect.
@@ -54,7 +58,7 @@ public override object ConvertFromString(string value, IValueSerializerContext c
5458
{
5559
return base.ConvertFromString( value, context );
5660
}
57-
}
61+
}
5862

5963
/// <summary>
6064
/// Converts the value into a string.

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/PointValueSerializer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,7 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
13+
using System.ComponentModel;
14+
using System.Globalization;
1215
using System.Windows.Markup;
16+
using System.Windows.Converters;
1317

1418
namespace System.Windows.Converters
1519
{
@@ -39,7 +43,7 @@ public override bool CanConvertToString(object value, IValueSerializerContext co
3943
}
4044

4145
return true;
42-
}
46+
}
4347

4448
/// <summary>
4549
/// Converts a string into a Point.
@@ -54,7 +58,7 @@ public override object ConvertFromString(string value, IValueSerializerContext c
5458
{
5559
return base.ConvertFromString( value, context );
5660
}
57-
}
61+
}
5862

5963
/// <summary>
6064
/// Converts the value into a string.

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/RectValueSerializer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,7 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
13+
using System.ComponentModel;
14+
using System.Globalization;
1215
using System.Windows.Markup;
16+
using System.Windows.Converters;
1317

1418
namespace System.Windows.Converters
1519
{
@@ -39,7 +43,7 @@ public override bool CanConvertToString(object value, IValueSerializerContext co
3943
}
4044

4145
return true;
42-
}
46+
}
4347

4448
/// <summary>
4549
/// Converts a string into a Rect.
@@ -54,7 +58,7 @@ public override object ConvertFromString(string value, IValueSerializerContext c
5458
{
5559
return base.ConvertFromString( value, context );
5660
}
57-
}
61+
}
5862

5963
/// <summary>
6064
/// Converts the value into a string.

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/SizeValueSerializer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,7 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
13+
using System.ComponentModel;
14+
using System.Globalization;
1215
using System.Windows.Markup;
16+
using System.Windows.Converters;
1317

1418
namespace System.Windows.Converters
1519
{
@@ -39,7 +43,7 @@ public override bool CanConvertToString(object value, IValueSerializerContext co
3943
}
4044

4145
return true;
42-
}
46+
}
4347

4448
/// <summary>
4549
/// Converts a string into a Size.
@@ -54,7 +58,7 @@ public override object ConvertFromString(string value, IValueSerializerContext c
5458
{
5559
return base.ConvertFromString( value, context );
5660
}
57-
}
61+
}
5862

5963
/// <summary>
6064
/// Converts the value into a string.

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/VectorValueSerializer.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,7 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
13+
using System.ComponentModel;
14+
using System.Globalization;
1215
using System.Windows.Markup;
16+
using System.Windows.Converters;
1317

1418
namespace System.Windows.Converters
1519
{
@@ -39,7 +43,7 @@ public override bool CanConvertToString(object value, IValueSerializerContext co
3943
}
4044

4145
return true;
42-
}
46+
}
4347

4448
/// <summary>
4549
/// Converts a string into a Vector.
@@ -54,7 +58,7 @@ public override object ConvertFromString(string value, IValueSerializerContext c
5458
{
5559
return base.ConvertFromString( value, context );
5660
}
57-
}
61+
}
5862

5963
/// <summary>
6064
/// Converts the value into a string.

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
using MS.Internal;
1313
using System.ComponentModel;
14+
using System.Globalization;
1415
using System.Windows.Markup;
1516
using System.Windows.Converters;
16-
// These types are aliased to match the unamanaged names used in interop
1717

1818
namespace System.Windows
1919
{
20+
2021
[Serializable]
2122
[TypeConverter(typeof(Int32RectConverter))]
2223
[ValueSerializer(typeof(Int32RectValueSerializer))] // Used by MarkupWriter
@@ -216,7 +217,8 @@ public int X
216217
{
217218
_x = value;
218219
}
219-
}
220+
221+
}
220222

221223
/// <summary>
222224
/// Y - int. Default value is 0.
@@ -232,7 +234,8 @@ public int Y
232234
{
233235
_y = value;
234236
}
235-
}
237+
238+
}
236239

237240
/// <summary>
238241
/// Width - int. Default value is 0.
@@ -248,7 +251,8 @@ public int Width
248251
{
249252
_width = value;
250253
}
251-
}
254+
255+
}
252256

253257
/// <summary>
254258
/// Height - int. Default value is 0.
@@ -264,7 +268,8 @@ public int Height
264268
{
265269
_height = value;
266270
}
267-
}
271+
272+
}
268273

269274
#endregion Public Properties
270275

@@ -317,6 +322,7 @@ public int Height
317322
/// </returns>
318323
public override string ToString()
319324
{
325+
320326
// Delegate to the internal method which implements all ToString calls.
321327
return ConvertToString(null /* format string */, null /* format provider */);
322328
}
@@ -330,6 +336,7 @@ public override string ToString()
330336
/// </returns>
331337
public string ToString(IFormatProvider provider)
332338
{
339+
333340
// Delegate to the internal method which implements all ToString calls.
334341
return ConvertToString(null /* format string */, provider);
335342
}
@@ -345,6 +352,7 @@ public string ToString(IFormatProvider provider)
345352
/// </returns>
346353
string IFormattable.ToString(string format, IFormatProvider provider)
347354
{
355+
348356
// Delegate to the internal method which implements all ToString calls.
349357
return ConvertToString(format, provider);
350358
}
@@ -406,6 +414,9 @@ internal string ConvertToString(string format, IFormatProvider provider)
406414
internal int _width;
407415
internal int _height;
408416

417+
418+
419+
409420
#endregion Internal Fields
410421

411422

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32RectConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,8 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
1213
using System.ComponentModel;
1314
using System.Globalization;
15+
using System.Windows.Markup;
16+
using System.Windows.Converters;
1417

1518
namespace System.Windows
1619
{

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
using MS.Internal;
1313
using System.ComponentModel;
14+
using System.Globalization;
1415
using System.Windows.Markup;
1516
using System.Windows.Converters;
16-
// These types are aliased to match the unamanaged names used in interop
1717

1818
namespace System.Windows
1919
{
20+
2021
[Serializable]
2122
[TypeConverter(typeof(PointConverter))]
2223
[ValueSerializer(typeof(PointValueSerializer))] // Used by MarkupWriter
@@ -185,7 +186,8 @@ public double X
185186
{
186187
_x = value;
187188
}
188-
}
189+
190+
}
189191

190192
/// <summary>
191193
/// Y - double. Default value is 0.
@@ -201,7 +203,8 @@ public double Y
201203
{
202204
_y = value;
203205
}
204-
}
206+
207+
}
205208

206209
#endregion Public Properties
207210

@@ -254,6 +257,7 @@ public double Y
254257
/// </returns>
255258
public override string ToString()
256259
{
260+
257261
// Delegate to the internal method which implements all ToString calls.
258262
return ConvertToString(null /* format string */, null /* format provider */);
259263
}
@@ -267,6 +271,7 @@ public override string ToString()
267271
/// </returns>
268272
public string ToString(IFormatProvider provider)
269273
{
274+
270275
// Delegate to the internal method which implements all ToString calls.
271276
return ConvertToString(null /* format string */, provider);
272277
}
@@ -282,6 +287,7 @@ public string ToString(IFormatProvider provider)
282287
/// </returns>
283288
string IFormattable.ToString(string format, IFormatProvider provider)
284289
{
290+
285291
// Delegate to the internal method which implements all ToString calls.
286292
return ConvertToString(format, provider);
287293
}
@@ -334,6 +340,9 @@ internal string ConvertToString(string format, IFormatProvider provider)
334340
internal double _x;
335341
internal double _y;
336342

343+
344+
345+
337346
#endregion Internal Fields
338347

339348

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/PointConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,8 +9,11 @@
99
// Please see MilCodeGen.html for more information.
1010
//
1111

12+
using MS.Internal;
1213
using System.ComponentModel;
1314
using System.Globalization;
15+
using System.Windows.Markup;
16+
using System.Windows.Converters;
1417

1518
namespace System.Windows
1619
{

0 commit comments

Comments
 (0)