forked from enlightenment/efl
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:
parent
0265f4fd55
commit
c40e948270
|
@ -18,6 +18,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
|
|
||||||
|
@ -38,6 +39,8 @@ internal class AccessorNativeFunctions
|
||||||
/// similar to C++ STL's and C# IEnumerable.
|
/// similar to C++ STL's and C# IEnumerable.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class Accessor<T> : IEnumerable<T>, IDisposable
|
public class Accessor<T> : IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>Pointer to the native accessor.</summary>
|
/// <summary>Pointer to the native accessor.</summary>
|
||||||
|
@ -177,6 +180,8 @@ public class Accessor<T> : IEnumerable<T>, IDisposable
|
||||||
/// <summary>Accessor for Inlists.
|
/// <summary>Accessor for Inlists.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class AccessorInList<T> : Accessor<T>
|
public class AccessorInList<T> : Accessor<T>
|
||||||
{
|
{
|
||||||
/// <summary>Create a new accessor wrapping the given pointer.
|
/// <summary>Create a new accessor wrapping the given pointer.
|
||||||
|
@ -202,6 +207,8 @@ public class AccessorInList<T> : Accessor<T>
|
||||||
/// <summary>Accessor for Inarrays.
|
/// <summary>Accessor for Inarrays.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class AccessorInArray<T> : Accessor<T>
|
public class AccessorInArray<T> : Accessor<T>
|
||||||
{
|
{
|
||||||
/// <summary>Create a new accessor wrapping the given pointer.
|
/// <summary>Create a new accessor wrapping the given pointer.
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.ArrayNativeFunctions;
|
using static Eina.ArrayNativeFunctions;
|
||||||
|
@ -65,6 +66,8 @@ public static class ArrayNativeFunctions
|
||||||
/// <summary>A container of contiguous allocated elements.
|
/// <summary>A container of contiguous allocated elements.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class Array<T> : IEnumerable<T>, IDisposable
|
public class Array<T> : IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
public const uint DefaultStep = 32;
|
public const uint DefaultStep = 32;
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.IteratorNativeFunctions;
|
using static Eina.IteratorNativeFunctions;
|
||||||
|
@ -198,6 +199,8 @@ public static class HashNativeFunctions
|
||||||
///
|
///
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </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
|
public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDisposable
|
||||||
{
|
{
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.InarrayNativeFunctions;
|
using static Eina.InarrayNativeFunctions;
|
||||||
|
@ -87,6 +88,8 @@ public static class InarrayNativeFunctions
|
||||||
/// <summary>Wrapper around an inplace array.
|
/// <summary>Wrapper around an inplace array.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class Inarray<T> : IEnumerable<T>, IDisposable
|
public class Inarray<T> : IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
public const uint DefaultStep = 0;
|
public const uint DefaultStep = 0;
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.InlistNativeFunctions;
|
using static Eina.InlistNativeFunctions;
|
||||||
|
@ -100,6 +101,8 @@ public static class InlistNativeFunctions
|
||||||
/// <summary>Wrapper around an inplace list.
|
/// <summary>Wrapper around an inplace list.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class Inlist<T> : IEnumerable<T>, IDisposable
|
public class Inlist<T> : IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.IteratorNativeFunctions;
|
using static Eina.IteratorNativeFunctions;
|
||||||
|
@ -49,6 +50,8 @@ public static class IteratorNativeFunctions
|
||||||
/// <summary>Wrapper around a native Eina iterator.
|
/// <summary>Wrapper around a native Eina iterator.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix",
|
||||||
|
Justification="This is a generalized container mapping the native one.")]
|
||||||
public class Iterator<T> : IEnumerable<T>, IDisposable
|
public class Iterator<T> : IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using static Eina.TraitFunctions;
|
using static Eina.TraitFunctions;
|
||||||
using static Eina.ListNativeFunctions;
|
using static Eina.ListNativeFunctions;
|
||||||
|
@ -124,6 +125,8 @@ public static class ListNativeFunctions
|
||||||
/// <summary>Native wrapper around a linked list of items.
|
/// <summary>Native wrapper around a linked list of items.
|
||||||
/// <para>Since EFL 1.23.</para>
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// </summary>
|
/// </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
|
public class List<T> : IList<T>, IEnumerable<T>, IDisposable
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
[CallerFilePath] string file = null,
|
[CallerFilePath] string file = null,
|
||||||
[CallerLineNumber] int line = 0)
|
[CallerLineNumber] int line = 0)
|
||||||
{
|
{
|
||||||
generated = Efl.Eo.BindingEntity.IsBindingEntity(((object)this).GetType());
|
generated = Efl.Eo.BindingEntityAttribute.IsBindingEntity(((object)this).GetType());
|
||||||
IntPtr actual_klass = baseKlass;
|
IntPtr actual_klass = baseKlass;
|
||||||
if (!generated)
|
if (!generated)
|
||||||
{
|
{
|
||||||
|
|
|
@ -828,11 +828,11 @@ class PrivateNativeClass : NativeClass
|
||||||
AllowMultiple = false,
|
AllowMultiple = false,
|
||||||
Inherited = false)
|
Inherited = false)
|
||||||
]
|
]
|
||||||
public class BindingEntity: System.Attribute
|
public class BindingEntityAttribute: System.Attribute
|
||||||
{
|
{
|
||||||
public static bool IsBindingEntity(System.Type t)
|
public static bool IsBindingEntity(System.Type t)
|
||||||
{
|
{
|
||||||
return Attribute.GetCustomAttribute(t, typeof(BindingEntity), false) != null;
|
return Attribute.GetCustomAttribute(t, typeof(BindingEntityAttribute), false) != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue