Page MenuHomePhabricator

eolian-mono: Renaming suffix for event and event args
ClosedPublic

Authored by brunobelo on Aug 21 2019, 1:53 PM.

Diff Detail

Repository
rEFL core/efl
Branch
arcpatch-D9692
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13062
Build 9289: arc lint + arc unit
brunobelo created this revision.Aug 21 2019, 1:53 PM
brunobelo requested review of this revision.Aug 21 2019, 1:53 PM
brunobelo edited projects, added Restricted Project, efl (efl-1.23), efl: language bindings; removed efl.Aug 21 2019, 2:02 PM

I agree that the underscore looks weird (we do not use it anywhere in the C# bindings). But EvtEventArgs is even weirder.
Can't we just replace _Args with Args? (I know this is not what the C# guidelines propose)

I agree that the underscore looks weird (we do not use it anywhere in the C# bindings). But EvtEventArgs is even weirder.
Can't we just replace _Args with Args? (I know this is not what the C# guidelines propose)

Today:
button.ClickedEvt += (object sender, ClickableClickedEvt_Args args) {...};

Current patch
button.ClickedEvt += (object sender, ClickableClickedEvtEventArgs args) {...};

What about: Renaming events to an Event Suffix and only the Args suffix on the structs:
button.ClickedEvent += (object sender, ClickableClickedEventArgs args) {...};

Thoughts @woohyun @segfaultxavi ? This could help with T8163 too.

lauromoura requested changes to this revision.Aug 29 2019, 7:31 AM

So, let's reuse this diff to change both the event suffix and the args one.

This revision now requires changes to proceed.Aug 29 2019, 7:31 AM
brunobelo updated this revision to Diff 24643.Aug 30 2019, 7:13 AM

Updating the name convention.

brunobelo retitled this revision from eolian-mono: Renaming suffix for event args. to eolian-mono: Renaming suffix for event and event args.
brunobelo edited the summary of this revision. (Show Details)
brunobelo updated this revision to Diff 24666.Aug 30 2019, 1:07 PM

Fixing a bad smell.

brunobelo updated this revision to Diff 24667.Aug 30 2019, 1:27 PM

Fixing the diff.

lauromoura accepted this revision.Aug 30 2019, 3:49 PM

Good to go. Examples to be updated in another diff.

This revision is now accepted and ready to land.Aug 30 2019, 3:49 PM

Thank you for this patch! :)

This revision was automatically updated to reflect the committed changes.