-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSystemService.cs
More file actions
40 lines (32 loc) · 850 Bytes
/
SystemService.cs
File metadata and controls
40 lines (32 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Collections;
using uFrame.IOC;
using UniRx;
namespace uFrame.Kernel
{
/// <summary>
/// This class is a generic base class for a systemservice, your probably looking for SystemServiceMonoBehaviour.
/// </summary>
public abstract class SystemService : ISystemService
{
[Inject]
public IEventAggregator EventAggregator { get; set; }
public virtual void Setup()
{
}
public virtual IEnumerator SetupAsync()
{
yield break;
}
public virtual void Dispose()
{
}
public IObservable<TEvent> OnEvent<TEvent>()
{
return EventAggregator.GetEvent<TEvent>();
}
public void Publish(object eventMessage)
{
EventAggregator.Publish(eventMessage);
}
}
}