csharp:Suppressing Warning and Add suffix collection.
authorBruno da Silva Belo <bruno.belo@expertisesolutions.com.br>
Tue, 17 Dec 2019 13:56:42 +0000 (10:56 -0300)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 17 Dec 2019 21:28:30 +0000 (06:28 +0900)
Summary: ref T8408

Reviewers: lauromoura, felipealmeida, YOhoho, jptiz

Reviewed By: jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8408

Differential Revision: https://phab.enlightenment.org/D10669

src/bindings/mono/eina_mono/eina_accessor.cs
src/bindings/mono/eina_mono/eina_array.cs
src/bindings/mono/eina_mono/eina_hash.cs
src/bindings/mono/eina_mono/eina_inarray.cs
src/bindings/mono/eina_mono/eina_inlist.cs
src/bindings/mono/eina_mono/eina_iterator.cs
src/bindings/mono/eina_mono/eina_list.cs
src/bindings/mono/eo_mono/EoWrapper.cs
src/bindings/mono/eo_mono/iwrapper.cs

index 64b4216..7c968a3 100644 (file)
@@ -18,6 +18,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 
@@ -38,6 +39,8 @@ internal class AccessorNativeFunctions
 /// similar to C++ STL's and C# IEnumerable.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class Accessor<T> : IEnumerable<T>, IDisposable
 {
     /// <summary>Pointer to the native accessor.</summary>
@@ -177,6 +180,8 @@ public class Accessor<T> : IEnumerable<T>, IDisposable
 /// <summary>Accessor for Inlists.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class AccessorInList<T> : Accessor<T>
 {
     /// <summary>Create a new accessor wrapping the given pointer.
@@ -202,6 +207,8 @@ public class AccessorInList<T> : Accessor<T>
 /// <summary>Accessor for Inarrays.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class AccessorInArray<T> : Accessor<T>
 {
     /// <summary>Create a new accessor wrapping the given pointer.
index ce26acd..1573a88 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.ArrayNativeFunctions;
@@ -65,6 +66,8 @@ public static class ArrayNativeFunctions
 /// <summary>A container of contiguous allocated elements.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")] 
 public class Array<T> : IEnumerable<T>, IDisposable
 {
     public const uint DefaultStep = 32;
index 5b6f473..2e1d184 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.IteratorNativeFunctions;
@@ -198,6 +199,8 @@ public static class HashNativeFunctions
 ///
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification = "This is a generalized container mapping the native one.")]
 public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDisposable
 {
     [EditorBrowsable(EditorBrowsableState.Never)]
index 0373b43..f341a54 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.InarrayNativeFunctions;
@@ -87,6 +88,8 @@ public static class InarrayNativeFunctions
 /// <summary>Wrapper around an inplace array.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class Inarray<T> : IEnumerable<T>, IDisposable
 {
     public const uint DefaultStep = 0;
index 80cfe2b..f4c95e1 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.InlistNativeFunctions;
@@ -100,6 +101,8 @@ public static class InlistNativeFunctions
 /// <summary>Wrapper around an inplace list.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class Inlist<T> : IEnumerable<T>, IDisposable
 {
     [EditorBrowsable(EditorBrowsableState.Never)]
index fb73f88..d0f62bf 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.IteratorNativeFunctions;
@@ -49,6 +50,8 @@ public static class IteratorNativeFunctions
 /// <summary>Wrapper around a native Eina iterator.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class Iterator<T> : IEnumerable<T>, IDisposable
 {
     [EditorBrowsable(EditorBrowsableState.Never)]
index d14dd26..60b33e5 100644 (file)
@@ -19,6 +19,7 @@ using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 
 using static Eina.TraitFunctions;
 using static Eina.ListNativeFunctions;
@@ -124,6 +125,8 @@ public static class ListNativeFunctions
 /// <summary>Native wrapper around a linked list of items.
 /// <para>Since EFL 1.23.</para>
 /// </summary>
+[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
+                 Justification="This is a generalized container mapping the native one.")]
 public class List<T> : IList<T>, IEnumerable<T>, IDisposable
 {
 
index 7445df3..99e60b1 100644 (file)
@@ -100,7 +100,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
                         [CallerFilePath] string file = null,
                         [CallerLineNumber] int line = 0)
     {
-        generated = Efl.Eo.BindingEntity.IsBindingEntity(((object)this).GetType());
+        generated = Efl.Eo.BindingEntityAttribute.IsBindingEntity(((object)this).GetType());
         IntPtr actual_klass = baseKlass;
         if (!generated)
         {
index ed61634..497c7d2 100644 (file)
@@ -828,11 +828,11 @@ class PrivateNativeClass : NativeClass
                        AllowMultiple = false,
                        Inherited = false)
 ]
-public class BindingEntity: System.Attribute
+public class BindingEntityAttribute: System.Attribute
 {
     public static bool IsBindingEntity(System.Type t)
     {
-        return Attribute.GetCustomAttribute(t, typeof(BindingEntity), false) != null;
+        return Attribute.GetCustomAttribute(t, typeof(BindingEntityAttribute), false) != null;
     }
 }