eolian_mono: avoid generating set-only property

Summary:
According to Property Design Guidelines of MS, set-only properties are not recommeneded.
(see more, https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/property)

Furthermore, there is stylecop warnings(CA1044)

ref T8396

List of removed set-only properies.
```
Efl.Access.Editable.IText.TextContent { set; }
Efl.App.CommandArray { set; }
Efl.App.CommandString { set; }
Efl.Canvas.Filter.IInternal.FilterChanged { set; }
Efl.Canvas.Filter.IInternal.FilterInvalid { set; }
Efl.Canvas.ImageInternal.FilterChanged { set; }
Efl.Canvas.ImageInternal.FilterInvalid { set; }
Efl.Canvas.Textblock.FilterChanged { set; }
Efl.Canvas.Textblock.FilterInvalid { set; }
Efl.Canvas.Vg.Image.Data { set; }
Efl.Canvas.Vg.Node.CompMethod { set; }
Efl.Core.ICommandLine.CommandArray { set; }
Efl.Core.ICommandLine.CommandString { set; }
Efl.Exe.CommandArray { set; }
Efl.Exe.CommandString { set; }
Efl.Ui.AlertPopup.Button { set; }
Efl.Ui.Collection.MatchContent { set; }
Efl.Ui.CollectionView.MatchContent { set; }
Efl.Ui.IScrollable.MatchContent { set; }
Efl.Ui.ImageZoomable.MatchContent { set; }
Efl.Ui.Panel.MatchContent { set; }
Efl.Ui.PositionManager.Grid.DataAccess { set; }
Efl.Ui.PositionManager.Grid.ScrollPosition { set; }
Efl.Ui.PositionManager.Grid.Viewport { set; }
Efl.Ui.PositionManager.IDataAccessV1.DataAccess { set; }
Efl.Ui.PositionManager.IEntity.ScrollPosition { set; }
Efl.Ui.PositionManager.IEntity.Viewport { set; }
Efl.Ui.PositionManager.List.DataAccess { set; }
Efl.Ui.PositionManager.List.ScrollPosition { set; }
Efl.Ui.PositionManager.List.Viewport { set; }
Efl.Ui.Scroll.Manager.MatchContent { set; }
Efl.Ui.Scroll.Manager.Pan { set; }
Efl.Ui.Scroller.MatchContent { set; }
Efl.Ui.Spotlight.Manager.Size { set; }
Efl.Ui.Textbox.TextContent { set; }
Efl.Ui.Widget.ResizeObject { set; }
Efl.Ui.Win.PropFocusSkip { set; }
```

Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: woohyun, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8396

Differential Revision: https://phab.enlightenment.org/D11138
This commit is contained in:
Yeongjong Lee 2020-01-22 09:40:18 +09:00
parent aeb2b506fd
commit cade1b3c3c
3 changed files with 6 additions and 2 deletions

View File

@ -428,6 +428,10 @@ struct property_wrapper_definition_generator
if (is_interface && (!is_get_public && !is_set_public))
return true;
// Do not generate set-only proeprty
if (property.setter.is_engaged() && !property.getter.is_engaged())
return true;
// C# interface members are declared automatically as public
if (is_interface)
{

View File

@ -407,7 +407,7 @@ class TestCsharpProperties
var obj = new Dummy.TestObject();
int val = -1984;
obj.SetterOnly = val;
obj.SetSetterOnly(val);
Test.AssertEquals(val, obj.GetSetterOnly());
obj.Dispose();
}

View File

@ -320,7 +320,7 @@ class TestEventWithDeadWrappers
EventHandler<Dummy.TestObjectEvtWithIntEventArgs> cb)
{
var obj = new Dummy.TestObject();
manager.Emitter = obj;
manager.SetEmitter(obj);
obj.EvtWithIntEvent += cb;
return new WeakReference(obj);