efl/src/bin/eolian_mono/eolian/mono
Vitor Sousa 4496022a3c csharp: fix Eina_Stringshare support in containers for manual and generated API
Summary:
Both C strings and eina stringshares are bound as regular strings in EFL#, as
working directly with these types would demand unnecessary hassle from the user
viewpoint.
But for eina containers this distinction is important, and since C# generics
do not provide a convenient way of dealing with the same type requiring a
different management based on some other condition (at least not without
compromising the usability for other types), we added a simple `System.String`
wrapper named `Eina.Stringshare` that works as a placeholder for signaling
this distinction.

Working with this class should be transparent in most use cases because it
converts to and from `System.String` implicitly.
It also implements equality/inequality methods for easier comparison with
strings and other stringshare objects.

Add new methods and a new container element trait for dealing specifically
with `Eina_Stringshare` elements.

Adapt eolian_mono to identify and generate the proper placeholder in methods
that require stringshare containers.

Remove some direct uses of DllImport-ed functions in favor of more flexible
manual binding methods.

Move `Eina.Stringshare` DllImport directives to a static class named
`NativeMethods`, in accordance with the code design warning CA1060.
Also add a TODO comment to move all other DllImport directives to this class.

Change parameter of the method `Efl.Csharp.Application.OnInitialize` from
`Eina.Array<System.String>` to `string[]`.
This will make this API more similar with the default C# way of receiving
command line arguments.

Add tests for containers storing stringshare elements.

Reviewers: felipealmeida, lauromoura, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9178
2019-06-28 10:44:52 -03:00
..
alias_definition.hh csharp: Add docs for aliases 2019-05-03 16:22:09 +02:00
async_function_definition.hh csharp: Some docs improvements. 2019-05-03 13:59:11 +02:00
blacklist.hh csharp: Make classes abstract and rework casting 2019-04-05 19:56:42 -03:00
documentation.hh csharp: Fixes repeated method names. 2019-04-23 12:31:37 +02:00
enum_definition.hh csharp: Simple spacing rules changes 2019-04-22 18:04:31 -03:00
events.hh eolian_mono: fix to support event info which is a type defined in eo 2019-06-27 14:35:43 -03:00
function_declaration.hh efl-mono: Enable selecting to build @beta items 2019-01-17 21:45:49 +09:00
function_definition.hh eolian_mono: support eo access modifiers 2019-06-24 19:19:00 +09:00
function_helpers.hh eolian_mono: support eo access modifiers 2019-06-24 19:19:00 +09:00
function_pointer.hh csharp: Fix free_cb calling under dotnet. 2019-04-15 15:24:29 -03:00
function_registration.hh csharp: refactor native_inherit into a nested class. 2019-04-23 11:57:51 +02:00
generation_contexts.hh mono-docs: Allow derived classes to have external examples 2019-04-12 18:13:29 +02:00
helpers.hh eolian_csharp: add indentation context 2019-03-26 16:42:36 -03:00
klass.hh csharp: make inherited C# classes constructible from native C 2019-06-28 10:38:57 -03:00
logging.hh efl_mono: More uniformization of the handling of names 2018-05-03 18:04:41 -03:00
marshall_annotation.hh csharp: Small style changes 2019-04-22 18:20:52 -03:00
marshall_type.hh csharp: fix Eina_Stringshare support in containers for manual and generated API 2019-06-28 10:44:52 -03:00
marshall_type_impl.hh csharp: fix Eina_Stringshare support in containers for manual and generated API 2019-06-28 10:44:52 -03:00
name_helpers.hh csharp: Add Part suffix for the part wrappers 2019-05-07 13:53:39 +02:00
parameter.hh eolian_mono: small correction when checking for iterator and accessor parameters 2019-06-27 14:27:34 -03:00
part_definition.hh csharp: Fix property helper doc indent 2019-05-06 13:45:58 +02:00
struct_definition.hh csharp: fix Eina_Stringshare support in containers for manual and generated API 2019-06-28 10:44:52 -03:00
struct_fields.hh csharp: Small style changes 2019-04-22 18:20:52 -03:00
type.hh csharp: fix Eina_Stringshare support in containers for manual and generated API 2019-06-28 10:44:52 -03:00
type_impl.hh csharp: fix Eina_Stringshare support in containers for manual and generated API 2019-06-28 10:44:52 -03:00
using_decl.hh csharp: Change to new class API. 2018-11-29 21:29:48 -02:00
utils.hh csharp: Fix event names with underscore. 2019-03-11 19:28:02 -03:00
variable_definition.hh csharp: Some docs improvements. 2019-05-03 13:59:11 +02:00