Representational Method Signature #6519
Unanswered
BigSquareHasNoEdge
asked this question in
General
Replies: 2 comments
-
This style is one of the things I dislike about Objective C... |
Beta Was this translation helpful? Give feedback.
0 replies
-
This can be even harder to understand for non-English speakers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How about this idea?
Wouldn't it be interesting if C# compiler would have this feature?
Declaration type 1:
void On(string propertyName)PropertyChanged { }
call:
On("Name")PropertyChanged;
or
On%PropertyChanged("Name");
or
OnPropertyChanged("Name");
Declaration type 2:
void Add(int n)To(Store store){ }
call:
Add(1)To(myStore);
or
Add%To(1, myStore);
or
AddTo(1, myStore);
Declaration type 3
void Subscribe(object subscriber)To(string messageKey)Of<TPublisher> { }
call:
Subscribe(this)To("ProductAdded")Of<ProductViewModel>;
or
Subscribe%To(this, "ProductAdded")Of<ProductViewModel>;
or
Subscribe%To%Of<ProductViewModel>(this, "ProductAdded");
or
SubscribeToOf<ProductViewModel>(this, "ProductAdded");
Beta Was this translation helpful? Give feedback.
All reactions