csharp:Suppressing Warning and Add suffix collection.

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
This commit is contained in:
Bruno da Silva Belo 2019-12-17 10:56:42 -03:00 committed by Lauro Moura
parent 0265f4fd55
commit c40e948270
9 changed files with 28 additions and 3 deletions

View 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.

View 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;

View 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)]

View 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;

View 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)]

View 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)]

View 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
{

View 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)
{

View 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;
}
}