[NUI] Suppress CA1716, CA1052, CA1034 for deprecated APIs
authorDongsug Song <dongsug.song@samsung.com>
Fri, 11 Dec 2020 01:17:08 +0000 (10:17 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 15 Dec 2020 06:33:59 +0000 (15:33 +0900)
- Since the detected classes will be deprecated, CA1716 warning message is suppressed.
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716
- This is conflict resolving patch for https://github.com/Samsung/TizenFX/pull/2374

src/Tizen.NUI/src/internal/ItemView.cs
src/Tizen.NUI/src/public/BaseComponents/Scrollable.cs
src/Tizen.NUI/src/public/Renderer.cs
src/Tizen.NUI/src/public/Shader.cs
src/Tizen.NUI/src/public/UIComponents/ScrollView.cs
src/Tizen.NUI/src/public/UIComponents/ToggleButton.cs

index 060b821..aa37389 100755 (executable)
@@ -63,11 +63,11 @@ namespace Tizen.NUI
         /// <summary>
         /// Property for ItemView. This is internal use only, so not recommended to use. Need to use ItemView's properties.
         /// </summary>
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [Obsolete("Deprecated in API6; Will be removed in API9.")]
         [EditorBrowsable(EditorBrowsableState.Never)]
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+#pragma warning disable CA1034, CA1052, CA1716 // Identifiers should not match keywords
         public new class Property
+#pragma warning restore CA1034, CA1052, CA1716 // Identifiers should not match keywords
         {
             /// <summary>
             /// LAYOUT. This is internal use only, so not recommended to use. Need to use ItemView's properties.
index 254e148..40bd2f7 100755 (executable)
@@ -747,10 +747,11 @@ namespace Tizen.NUI.BaseComponents
         /// Enumeration for the instance of properties belonging to the Scrollable class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         [Obsolete("Deprecated in API6; Will be removed in API9.")]
+#pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
         public new class Property
+#pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
         {
             /// <summary>
             /// The color of the overshoot effect.
index e714b29..a3da998 100755 (executable)
@@ -618,11 +618,11 @@ namespace Tizen.NUI
         /// Enumeration for instances of properties belonging to the Renderer class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         [Obsolete("Deprecated in API6; Will be removed in API9.")]
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+#pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
         public class Property
+#pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
         {
             /// <summary>
             /// This should be internal, please do not use.
index 84ad8c7..64f7653 100755 (executable)
@@ -120,11 +120,11 @@ namespace Tizen.NUI
         /// Enumeration for instances of properties belonging to the Shader class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         [Obsolete("Deprecated in API6; Will be removed in API9.")]
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+#pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
         public class Property
+#pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
         {
             /// <summary>
             /// The default value is empty.
index 10a1bc3..52764fe 100755 (executable)
@@ -1247,11 +1247,11 @@ namespace Tizen.NUI
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// This will be deprecated
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [Obsolete("Deprecated in API6; Will be removed in API9. Please use Tizen.NUI.Components")]
         [EditorBrowsable(EditorBrowsableState.Never)]
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+#pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
         public new class Property
+#pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
         {
             /// <summary>
             /// This should be internal, please do not use.
index 0ecd6e7..d7b9356 100755 (executable)
@@ -175,11 +175,11 @@ namespace Tizen.NUI
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// This will be deprecated
-        [SuppressMessage("Microsoft.Design", "CA1052:StaticHolderTypesShouldBeStaticOrNotInheritable")]
         [Obsolete("Deprecated in API6; Will be removed in API9. Please use Tizen.NUI.Components")]
         [EditorBrowsable(EditorBrowsableState.Never)]
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+#pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
         public new class Property
+#pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
         {
             /// <summary>
             /// This should be internal, please do not use.