From b6521cc279cda9a9a1591a30c4f63220e196b3af Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Tue, 17 Dec 2019 11:00:09 -0300 Subject: [PATCH] csharp: Suppressing non-events Raise methods. Summary: ref T8390 Reviewers: lauromoura, felipealmeida, YOhoho, jptiz Reviewed By: jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8390 Differential Revision: https://phab.enlightenment.org/D10717 --- src/bindings/mono/eina_mono/eina_error.cs | 5 +++++ src/bindings/mono/eldbus_mono/eldbus_common.cs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bindings/mono/eina_mono/eina_error.cs b/src/bindings/mono/eina_mono/eina_error.cs index 44528cc691..1300e796ab 100644 --- a/src/bindings/mono/eina_mono/eina_error.cs +++ b/src/bindings/mono/eina_mono/eina_error.cs @@ -17,6 +17,7 @@ using System; using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; namespace Eina { @@ -153,6 +154,8 @@ public struct Error : IComparable, IEquatable /// back to the native code. For example, in an event handler. /// Since EFL 1.23. /// + [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", + Justification = "It's not an event.")] public static void RaiseIfUnhandledException() { Error e = Get(); @@ -167,6 +170,8 @@ public struct Error : IComparable, IEquatable /// Raises an exception. /// Since EFL 1.23. /// + [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", + Justification = "It's not an event.")] public static void Raise(Error e) { if (e != 0) diff --git a/src/bindings/mono/eldbus_mono/eldbus_common.cs b/src/bindings/mono/eldbus_mono/eldbus_common.cs index 9d6a408c47..2606fe92c8 100644 --- a/src/bindings/mono/eldbus_mono/eldbus_common.cs +++ b/src/bindings/mono/eldbus_mono/eldbus_common.cs @@ -87,7 +87,7 @@ public struct ObjectPath : IEquatable /// /// The ObjectPath to be converted. public static string ToString(ObjectPath path) => path.value; - + /// /// Gets a hash for . /// Since EFL 1.24. @@ -1551,6 +1551,8 @@ public static class Common /// Register the NullError. /// Since EFL 1.23. /// + [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", + Justification = "It's not an event.")] public static void RaiseNullHandle() { if (NullHandleError == 0)