• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修订版c5d296b98dfe25925103717a32b4796a6b66924b (tree)
时间2022-05-31 13:26:18
作者yoshy <yoshy.org.bitbucket@gz.j...>
Commiteryoshy

Log Message

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

更改概述

差异

--- 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)