-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathContentFlow.cs
More file actions
51 lines (41 loc) · 804 Bytes
/
ContentFlow.cs
File metadata and controls
51 lines (41 loc) · 804 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
41
42
43
44
45
46
47
48
49
50
51
using System;
public class ContentFlow
{
public class A
{
public A FieldA;
public B FieldB;
}
public class B
{
public A FieldA;
public B FieldB;
}
public void M(A a, B b)
{
var a1 = new A();
Sink(Through(a1.FieldA.FieldB));
a.FieldA.FieldB = new B();
Sink(Through(a));
var a2 = new A();
b.FieldB.FieldA = a2.FieldB.FieldA;
Sink(Through(b));
Sink(Through(Out()));
In(new A().FieldA.FieldB);
}
public static void Sink<T>(T t) { }
public T Through<T>(T t)
{
Sink(t);
return t;
}
public void In<T>(T t)
{
Sink(t);
}
public B Out()
{
var a = new A();
return a.FieldA.FieldB;
}
}