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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FObjBase
{
public class ConnContext
{
public ConnContext(IFConn from, UInt32 srcid, UInt32 magic)
{
this.from = from;
this.srcid = srcid;
this.magic = magic;
}
public IFConn from;
public UInt32 srcid;
public UInt32 magic;
public override bool Equals(object obj)
{
if (!(obj is ConnContext))
return false;
ConnContext cc = obj as ConnContext;
if (from != cc.from)
return false;
if (srcid != cc.srcid)
return false;
return true;
}
}
public delegate void AsyncCBHandler(object asyncContext, object retData);
/// <summary>
/// 异步回调
/// </summary>
public class AsyncCbAttribute : Attribute {
/// <summary>
/// 返回的数据类型
/// </summary>
public Type RetType { get; private set; }
/// <summary>
/// 无数据返回
/// </summary>
public AsyncCbAttribute()
{
}
/// <summary>
///
/// </summary>
/// <param name="retType"></param>
public AsyncCbAttribute(Type retType) {
RetType = retType;
}
}
}