CallAttribute.cs 1.44 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FObjBase.Reflect
{
    /// <summary>
    /// 注册 event 返回类型;
    /// 客户端,默认使用 Trigger_xxxx(xxxx为event名称),作为触发事件的函数,该函数的参数类型就是EventArgsType;
    /// </summary>
    public class PushAttribute : Attribute
    {
15
        public const string DefaultTriggerNameHeader = "Trigger_";
潘栩锋's avatar
潘栩锋 committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29
        public Type EventArgsType;
        public string TriggerName;
        public PushAttribute(Type eventArgsType)
        {
            EventArgsType = eventArgsType;
        }
        public PushAttribute(Type eventArgsType, string triggerName)
        {
            EventArgsType = eventArgsType;
            TriggerName = triggerName;
        }
    }

    /// <summary>
30
    /// 注册远程调用返回类型; 回调函数名称只能是 AsyncCBHandler asyncDelegate, object asyncContext
潘栩锋's avatar
潘栩锋 committed
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
    /// </summary>
    public class CallAttribute : Attribute
    {
        public Type ReponseType;
        public CallAttribute()
        {

        }
        public CallAttribute(Type reponseType)
        {
            ReponseType = reponseType;
        }
    }

    /// <summary>
    /// 注册 它的PropertyChanged 事件,且枚举它的子属性,
    /// 找到[PropertyPush] 递归 注册下去
    /// </summary>
    public class PropertyPushAttribute : Attribute
    {
        
    }


}