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
This commit is contained in:
Bruno da Silva Belo 2019-12-17 11:00:09 -03:00 committed by Lauro Moura
parent c40e948270
commit b6521cc279
2 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@
using System;
using System.Runtime.InteropServices;
using System.Diagnostics.CodeAnalysis;
namespace Eina
{
@ -153,6 +154,8 @@ public struct Error : IComparable<Error>, IEquatable<Error>
/// back to the native code. For example, in an event handler.
/// <para>Since EFL 1.23.</para>
/// </summary>
[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<Error>, IEquatable<Error>
/// Raises an exception.
/// <para>Since EFL 1.23.</para>
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate",
Justification = "It's not an event.")]
public static void Raise(Error e)
{
if (e != 0)

View File

@ -87,7 +87,7 @@ public struct ObjectPath : IEquatable<ObjectPath>
/// </summary>
/// <param name="path">The ObjectPath to be converted.</param>
public static string ToString(ObjectPath path) => path.value;
/// <summary>
/// Gets a hash for <see cref="ObjectPath" />.
/// <para>Since EFL 1.24.</para>
@ -1551,6 +1551,8 @@ public static class Common
/// Register the NullError.
/// <para>Since EFL 1.23.</para>
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate",
Justification = "It's not an event.")]
public static void RaiseNullHandle()
{
if (NullHandleError == 0)