Skip to content

Commit d782f50

Browse files
committed
Remove leftover 'WINDOWS_UWP' ifdefs
1 parent ba11dec commit d782f50

16 files changed

+8
-71
lines changed

components/Notifications/src/Badges/BadgeGlyphContent.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
#if WINDOWS_UWP
76
using Windows.Data.Xml.Dom;
8-
#endif
97

108
namespace CommunityToolkit.Notifications
119
{
@@ -80,7 +78,6 @@ public override string ToString()
8078
return GetContent();
8179
}
8280

83-
#if WINDOWS_UWP
8481
/// <summary>
8582
/// Retrieves the notification XML content as a WinRT Xml document.
8683
/// </summary>
@@ -91,8 +88,7 @@ public XmlDocument GetXml()
9188
xml.LoadXml(GetContent());
9289
return xml;
9390
}
94-
#endif
9591

9692
private BadgeGlyphValue _glyph = (BadgeGlyphValue)(-1);
9793
}
98-
}
94+
}

components/Notifications/src/Badges/BadgeNumericContent.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
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

5-
#if WINDOWS_UWP
65
using Windows.Data.Xml.Dom;
7-
#endif
86

97
namespace CommunityToolkit.Notifications
108
{
@@ -62,7 +60,6 @@ public override string ToString()
6260
return GetContent();
6361
}
6462

65-
#if WINDOWS_UWP
6663
/// <summary>
6764
/// Retrieves the notification Xml content as a WinRT Xml document.
6865
/// </summary>
@@ -73,8 +70,7 @@ public XmlDocument GetXml()
7370
xml.LoadXml(GetContent());
7471
return xml;
7572
}
76-
#endif
7773

7874
private uint _number = 0;
7975
}
80-
}
76+
}

components/Notifications/src/Common/BaseElement.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
using System.IO;
66
using System.Text;
77

8-
#if WINDOWS_UWP
98
using Windows.Data.Xml.Dom;
10-
#endif
119

1210
namespace CommunityToolkit.Notifications
1311
{
@@ -40,7 +38,6 @@ public string GetContent()
4038
}
4139
}
4240

43-
#if WINDOWS_UWP
4441
/// <summary>
4542
/// Retrieves the notification XML content as a WinRT XML document.
4643
/// </summary>
@@ -51,6 +48,5 @@ public XmlDocument GetXml()
5148
xml.LoadXml(GetContent());
5249
return xml;
5350
}
54-
#endif
5551
}
56-
}
52+
}

components/Notifications/src/Common/INotificationContent.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
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

5-
#if WINDOWS_UWP
65
using Windows.Data.Xml.Dom;
7-
#endif
86

97
namespace CommunityToolkit.Notifications
108
{
@@ -19,12 +17,10 @@ public interface INotificationContent
1917
/// <returns>The notification Xml content as a string.</returns>
2018
string GetContent();
2119

22-
#if WINDOWS_UWP
2320
/// <summary>
2421
/// Retrieves the notification Xml content as a WinRT Xml document.
2522
/// </summary>
2623
/// <returns>The notification Xml content as a WinRT Xml document.</returns>
2724
XmlDocument GetXml();
28-
#endif
2925
}
30-
}
26+
}

components/Notifications/src/Common/LimitedList{T}.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
using System;
66
using System.Collections;
77
using System.Collections.Generic;
8-
#if WINDOWS_UWP
9-
10-
#endif
118

129
namespace CommunityToolkit.Notifications
1310
{
@@ -113,4 +110,4 @@ internal interface IElementWithDescendants
113110
{
114111
IEnumerable<object> Descendants();
115112
}
116-
}
113+
}

components/Notifications/src/Common/NotificationContentValidationException.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
#if WINDOWS_UWP
7-
8-
#endif
96

107
namespace CommunityToolkit.Notifications
118
{
@@ -19,4 +16,4 @@ public NotificationContentValidationException(string message)
1916
{
2017
}
2118
}
22-
}
19+
}

components/Notifications/src/Tiles/TileContent.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
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

5-
#if WINDOWS_UWP
65
using Windows.Data.Xml.Dom;
76
using Windows.UI.Notifications;
8-
#endif
97

108
namespace CommunityToolkit.Notifications
119
{
@@ -28,7 +26,6 @@ public string GetContent()
2826
return ConvertToElement().GetContent();
2927
}
3028

31-
#if WINDOWS_UWP
3229
/// <summary>
3330
/// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Tile notification's constructor on either <see cref="TileNotification"/> or <see cref="ScheduledTileNotification"/>.
3431
/// </summary>
@@ -40,7 +37,6 @@ public XmlDocument GetXml()
4037

4138
return doc;
4239
}
43-
#endif
4440

4541
internal Element_Tile ConvertToElement()
4642
{
@@ -54,4 +50,4 @@ internal Element_Tile ConvertToElement()
5450
return tile;
5551
}
5652
}
57-
}
53+
}

components/Notifications/src/Toasts/Builder/CustomizeToast.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
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

5-
#if WINDOWS_UWP
6-
75
using Windows.Foundation;
86
using Windows.UI.Notifications;
97

@@ -35,5 +33,3 @@ namespace CommunityToolkit.Notifications
3533
/// <returns>An operation.</returns>
3634
public delegate IAsyncAction CustomizeScheduledToastAsync(ScheduledToastNotification toast);
3735
}
38-
39-
#endif

components/Notifications/src/Toasts/Builder/ToastContentBuilder.Visuals.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
using System.Collections.Generic;
77
using System.Linq;
88
using System.Text;
9-
10-
#if WINDOWS_UWP
119
using Windows.UI.Notifications;
12-
#endif
1310

1411
namespace CommunityToolkit.Notifications
1512
{
@@ -79,7 +76,6 @@ private IList<IToastBindingGenericChild> VisualChildren
7976
}
8077
}
8178

82-
#if WINDOWS_UWP
8379
/// <summary>
8480
/// Create an instance of NotificationData that can be used to update toast that has a progress bar.
8581
/// </summary>
@@ -125,7 +121,6 @@ public static NotificationData CreateProgressBarData(ToastContent toast, int ind
125121

126122
return data;
127123
}
128-
#endif
129124

130125
/// <summary>
131126
/// Add an Attribution Text to be displayed on the toast.

components/Notifications/src/Toasts/Builder/ToastContentBuilder.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ public ToastContent GetToastContent()
338338
return Content;
339339
}
340340

341-
#if WINDOWS_UWP
342341
/// <summary>
343342
/// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either <see cref="Windows.UI.Notifications.ToastNotification"/> or <see cref="Windows.UI.Notifications.ScheduledToastNotification"/>.
344343
/// </summary>
@@ -436,6 +435,5 @@ private async System.Threading.Tasks.Task ScheduleAsyncHelper(DateTimeOffset del
436435

437436
ToastNotificationManagerCompat.CreateToastNotifier().AddToSchedule(notif);
438437
}
439-
#endif
440438
}
441439
}

0 commit comments

Comments
 (0)