-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlanning.txt
More file actions
59 lines (48 loc) · 1.03 KB
/
Planning.txt
File metadata and controls
59 lines (48 loc) · 1.03 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System.Collections.Generic;
class Tick {}
class Book {}
interface IDataReceiver
{
void OnInit();
void OnTick(Tick tick);
void OnBookEvent(Book book);
void OnDeinit();
}
class DataVisualizer : IDataReceiver
{
public void OnBookEvent(Book book)
{
throw new System.NotImplementedException();
}
public void OnDeinit()
{
throw new System.NotImplementedException();
}
public void OnInit()
{
throw new System.NotImplementedException();
}
public void OnTick(Tick tick)
{
throw new System.NotImplementedException();
}
}
abstract class IDataProvider
{
public List<IDataReceiver> DataReceivers { get; protected set; }
}
class MetaTraderDataProvider
{
// call ontick and onbook of data receivers.
}
// Data Fetching idea
receivers.OnInit();
while (active)
{
if (receivedTick)
receivers.OnTick(tick);
if (receivedBook)
receivers.OnBookEvent(book);
}
receivers.OnDeinit();
// Implement and test with actual WPF structure