• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisãoc5d296b98dfe25925103717a32b4796a6b66924b (tree)
Hora2022-05-31 13:26:18
Autoryoshy <yoshy.org.bitbucket@gz.j...>
Commiteryoshy

Mensagem de Log

[MOD] EventWrapper.Subscribe をメソッドチェーン化

Mudança Sumário

Diff

--- a/Core/Event/EventWrapper.cs
+++ b/Core/Event/EventWrapper.cs
@@ -11,10 +11,12 @@ namespace CleanAuLait48.Core.Event
1111
1212 private bool disposedValue;
1313
14- public void Subscribe(Action handler)
14+ public EventWrapper Subscribe(Action handler)
1515 {
1616 Events += handler;
1717 handlers.Add(handler);
18+
19+ return this;
1820 }
1921
2022 public void Unsubscribe(Action handler)
@@ -69,10 +71,12 @@ namespace CleanAuLait48.Core.Event
6971 this.sender = sender;
7072 }
7173
72- public void Subscribe(EventHandler<T> handler)
74+ public EventWrapper<T> Subscribe(EventHandler<T> handler)
7375 {
7476 Events += handler;
7577 handlers.Add(handler);
78+
79+ return this;
7680 }
7781
7882 public void Unsubscribe(EventHandler<T> handler)