Currently, protected methods are being generated as public.
I tried to write patch to support eo access modifiers(like @protected) on EFL#. however there is a problem.
Method of C# interface have to be public.
Interface members are automatically public, and they can't include any access modifiers. Members also can't be static. (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/index)
but there is protected method of Eo interface. e.g. hint_size_restricted_min_set. you will get CS0106 Compiler error.(https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0106)
I have no idea how to solve this problem.
I think this is (again) an example of something that EO supports and one of the binding languages does not.
I see two options:
- Make the C# generator ignore @protected tags in interfaces.
- Modify Eolian so that it does not accept @protected tags in interfaces, and then we remove that tag from hint_size_restricted_min_set.
I agree with Microsoft here, I don't think protected methods on an interface make much sense. Therefore I prefer option 2.
However, if this is too much work now, we can create a task to do that later and proceed with option 1 for now.
What do you think @q66?
Note that current state is option 1. eolian_mono ignore @protected tags and make interface method public. Ah, you mean it is only interface case.
I also prefer option 2. end user shouldn't use @protected methods directly.