diff --git a/components/Notifications/src/Badges/BadgeGlyphContent.cs b/components/Notifications/src/Badges/BadgeGlyphContent.cs index 7e61b9068..5d02da2fd 100644 --- a/components/Notifications/src/Badges/BadgeGlyphContent.cs +++ b/components/Notifications/src/Badges/BadgeGlyphContent.cs @@ -3,9 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -#if WINDOWS_UWP using Windows.Data.Xml.Dom; -#endif namespace CommunityToolkit.Notifications { @@ -80,7 +78,6 @@ public override string ToString() return GetContent(); } -#if WINDOWS_UWP /// /// Retrieves the notification XML content as a WinRT Xml document. /// @@ -91,8 +88,7 @@ public XmlDocument GetXml() xml.LoadXml(GetContent()); return xml; } -#endif private BadgeGlyphValue _glyph = (BadgeGlyphValue)(-1); } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Badges/BadgeNumericContent.cs b/components/Notifications/src/Badges/BadgeNumericContent.cs index 03048c732..c3cda912b 100644 --- a/components/Notifications/src/Badges/BadgeNumericContent.cs +++ b/components/Notifications/src/Badges/BadgeNumericContent.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP using Windows.Data.Xml.Dom; -#endif namespace CommunityToolkit.Notifications { @@ -62,7 +60,6 @@ public override string ToString() return GetContent(); } -#if WINDOWS_UWP /// /// Retrieves the notification Xml content as a WinRT Xml document. /// @@ -73,8 +70,7 @@ public XmlDocument GetXml() xml.LoadXml(GetContent()); return xml; } -#endif private uint _number = 0; } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Common/BaseElement.cs b/components/Notifications/src/Common/BaseElement.cs index bf607551e..809eca5c1 100644 --- a/components/Notifications/src/Common/BaseElement.cs +++ b/components/Notifications/src/Common/BaseElement.cs @@ -5,9 +5,7 @@ using System.IO; using System.Text; -#if WINDOWS_UWP using Windows.Data.Xml.Dom; -#endif namespace CommunityToolkit.Notifications { @@ -40,7 +38,6 @@ public string GetContent() } } -#if WINDOWS_UWP /// /// Retrieves the notification XML content as a WinRT XML document. /// @@ -51,6 +48,5 @@ public XmlDocument GetXml() xml.LoadXml(GetContent()); return xml; } -#endif } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Common/INotificationContent.cs b/components/Notifications/src/Common/INotificationContent.cs index a025624aa..d84afe4a3 100644 --- a/components/Notifications/src/Common/INotificationContent.cs +++ b/components/Notifications/src/Common/INotificationContent.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP using Windows.Data.Xml.Dom; -#endif namespace CommunityToolkit.Notifications { @@ -19,12 +17,10 @@ public interface INotificationContent /// The notification Xml content as a string. string GetContent(); -#if WINDOWS_UWP /// /// Retrieves the notification Xml content as a WinRT Xml document. /// /// The notification Xml content as a WinRT Xml document. XmlDocument GetXml(); -#endif } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Common/LimitedList{T}.cs b/components/Notifications/src/Common/LimitedList{T}.cs index f8d6045de..5ff4ac43b 100644 --- a/components/Notifications/src/Common/LimitedList{T}.cs +++ b/components/Notifications/src/Common/LimitedList{T}.cs @@ -5,9 +5,6 @@ using System; using System.Collections; using System.Collections.Generic; -#if WINDOWS_UWP - -#endif namespace CommunityToolkit.Notifications { @@ -113,4 +110,4 @@ internal interface IElementWithDescendants { IEnumerable Descendants(); } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Common/NotificationContentValidationException.cs b/components/Notifications/src/Common/NotificationContentValidationException.cs index 0aaf1e0ba..2963aa444 100644 --- a/components/Notifications/src/Common/NotificationContentValidationException.cs +++ b/components/Notifications/src/Common/NotificationContentValidationException.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -#if WINDOWS_UWP - -#endif namespace CommunityToolkit.Notifications { @@ -19,4 +16,4 @@ public NotificationContentValidationException(string message) { } } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Tiles/TileContent.cs b/components/Notifications/src/Tiles/TileContent.cs index b05d66f2d..0f4608809 100644 --- a/components/Notifications/src/Tiles/TileContent.cs +++ b/components/Notifications/src/Tiles/TileContent.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP using Windows.Data.Xml.Dom; using Windows.UI.Notifications; -#endif namespace CommunityToolkit.Notifications { @@ -28,7 +26,6 @@ public string GetContent() return ConvertToElement().GetContent(); } -#if WINDOWS_UWP /// /// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Tile notification's constructor on either or . /// @@ -40,7 +37,6 @@ public XmlDocument GetXml() return doc; } -#endif internal Element_Tile ConvertToElement() { @@ -54,4 +50,4 @@ internal Element_Tile ConvertToElement() return tile; } } -} \ No newline at end of file +} diff --git a/components/Notifications/src/Toasts/Builder/CustomizeToast.cs b/components/Notifications/src/Toasts/Builder/CustomizeToast.cs index 9623eb617..1f4bf30bb 100644 --- a/components/Notifications/src/Toasts/Builder/CustomizeToast.cs +++ b/components/Notifications/src/Toasts/Builder/CustomizeToast.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP - using Windows.Foundation; using Windows.UI.Notifications; @@ -35,5 +33,3 @@ namespace CommunityToolkit.Notifications /// An operation. public delegate IAsyncAction CustomizeScheduledToastAsync(ScheduledToastNotification toast); } - -#endif \ No newline at end of file diff --git a/components/Notifications/src/Toasts/Builder/ToastContentBuilder.Visuals.cs b/components/Notifications/src/Toasts/Builder/ToastContentBuilder.Visuals.cs index 0dce816a9..1e3ce72d9 100644 --- a/components/Notifications/src/Toasts/Builder/ToastContentBuilder.Visuals.cs +++ b/components/Notifications/src/Toasts/Builder/ToastContentBuilder.Visuals.cs @@ -6,10 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; - -#if WINDOWS_UWP using Windows.UI.Notifications; -#endif namespace CommunityToolkit.Notifications { @@ -79,7 +76,6 @@ private IList VisualChildren } } -#if WINDOWS_UWP /// /// Create an instance of NotificationData that can be used to update toast that has a progress bar. /// @@ -125,7 +121,6 @@ public static NotificationData CreateProgressBarData(ToastContent toast, int ind return data; } -#endif /// /// Add an Attribution Text to be displayed on the toast. diff --git a/components/Notifications/src/Toasts/Builder/ToastContentBuilder.cs b/components/Notifications/src/Toasts/Builder/ToastContentBuilder.cs index 9d379c660..2be548c84 100644 --- a/components/Notifications/src/Toasts/Builder/ToastContentBuilder.cs +++ b/components/Notifications/src/Toasts/Builder/ToastContentBuilder.cs @@ -338,7 +338,6 @@ public ToastContent GetToastContent() return Content; } -#if WINDOWS_UWP /// /// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either or . /// @@ -436,6 +435,5 @@ private async System.Threading.Tasks.Task ScheduleAsyncHelper(DateTimeOffset del ToastNotificationManagerCompat.CreateToastNotifier().AddToSchedule(notif); } -#endif } } diff --git a/components/Notifications/src/Toasts/Compat/ToastNotificationHistoryCompat.cs b/components/Notifications/src/Toasts/Compat/ToastNotificationHistoryCompat.cs index f307f1aa7..f94a46ff2 100644 --- a/components/Notifications/src/Toasts/Compat/ToastNotificationHistoryCompat.cs +++ b/components/Notifications/src/Toasts/Compat/ToastNotificationHistoryCompat.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP - using System.Collections.Generic; using Windows.UI.Notifications; @@ -90,5 +88,3 @@ public void RemoveGroup(string group) } } } - -#endif diff --git a/components/Notifications/src/Toasts/Compat/ToastNotificationManagerCompat.cs b/components/Notifications/src/Toasts/Compat/ToastNotificationManagerCompat.cs index 4ca367cfe..443e359fb 100644 --- a/components/Notifications/src/Toasts/Compat/ToastNotificationManagerCompat.cs +++ b/components/Notifications/src/Toasts/Compat/ToastNotificationManagerCompat.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP - using System; using System.Collections.Generic; using System.Diagnostics; @@ -56,5 +54,3 @@ public static bool CanUseHttpImages } } } - -#endif diff --git a/components/Notifications/src/Toasts/Compat/ToastNotifierCompat.cs b/components/Notifications/src/Toasts/Compat/ToastNotifierCompat.cs index 76d80d06e..a27ff19a5 100644 --- a/components/Notifications/src/Toasts/Compat/ToastNotifierCompat.cs +++ b/components/Notifications/src/Toasts/Compat/ToastNotifierCompat.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if WINDOWS_UWP - using System.Collections.Generic; using Windows.UI.Notifications; @@ -101,5 +99,3 @@ public NotificationSetting Setting } } } - -#endif diff --git a/components/Notifications/src/Toasts/ToastContent.cs b/components/Notifications/src/Toasts/ToastContent.cs index 9af5e6044..d361cca3e 100644 --- a/components/Notifications/src/Toasts/ToastContent.cs +++ b/components/Notifications/src/Toasts/ToastContent.cs @@ -4,10 +4,8 @@ using System; using System.Collections.Generic; -#if WINDOWS_UWP using Windows.Data.Xml.Dom; using Windows.UI.Notifications; -#endif namespace CommunityToolkit.Notifications { @@ -100,7 +98,6 @@ public string GetContent() return ConvertToElement().GetContent(); } -#if WINDOWS_UWP /// /// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either or . @@ -114,8 +111,6 @@ public XmlDocument GetXml() return doc; } -#endif - internal Element_Toast ConvertToElement() { if (ActivationOptions != null) @@ -189,4 +184,4 @@ private static Element_ToastActions ConvertToActionsElement(IToastActions action throw new NotImplementedException("Unknown actions type: " + actions.GetType()); } } -} \ No newline at end of file +} diff --git a/components/Notifications/tests/TestAssertHelper.cs b/components/Notifications/tests/TestAssertHelper.cs index df1fea6bf..7977768c7 100644 --- a/components/Notifications/tests/TestAssertHelper.cs +++ b/components/Notifications/tests/TestAssertHelper.cs @@ -272,20 +272,14 @@ public static void AssertToast(string expected, ToastContent toast) { AssertHelper.AssertXml(expected.ToLower(), toast.GetContent().ToLower()); -#if WINDOWS_UWP - // For WinRT, we'll test the XmlDocument method too, make sure it works. AssertHelper.AssertXml(expected, toast.GetXml().GetXml()); -#endif } public static void AssertTile(string expected, TileContent tile) { AssertHelper.AssertXml(expected.ToLower(), tile.GetContent().ToLower()); -#if WINDOWS_UWP - // For WinRT, we'll test the XmlDocument method too, make sure it works. AssertHelper.AssertXml(expected, tile.GetXml().GetXml()); -#endif } public static void AssertXml(string expected, string actual) diff --git a/components/Notifications/tests/Test_Badge_Xml.cs b/components/Notifications/tests/Test_Badge_Xml.cs index 0d58113ea..8dcab5e50 100644 --- a/components/Notifications/tests/Test_Badge_Xml.cs +++ b/components/Notifications/tests/Test_Badge_Xml.cs @@ -68,10 +68,7 @@ private static void AssertPayload(string expectedXml, INotificationContent notif { AssertHelper.AssertXml(expectedXml, notificationContent.GetContent()); -#if WINDOWS_UWP - // For WinRT, we'll test the XmlDocument method too, make sure it works. AssertHelper.AssertXml(expectedXml, notificationContent.GetXml().GetXml()); -#endif } } }