示例#1
0
        public static object InvokeActionMethod(this ITyperRef objRef, TyperAction action, params object[] objects)
        {
            var method = objRef.GetActionMethod(action);

            if (method == null)
            {
                return(null);
            }

            return(method.Invoke(objRef, objects));
        }
示例#2
0
 public static TyperAction GetAcceptTyperActions(this ITyperRef refObj)
 {
     return(refObj.GetType().GetAcceptTyperActions());
 }
示例#3
0
 public static IEnumerable <Type> GetTypers(this ITyperRef refObj)
 {
     return(refObj.GetType().GetTypers());
 }
示例#4
0
        //public static Type GetRefTyper(this ITyperEntity entity, string key, TyperAction action = TyperAction.None)
        //{
        //    return Typer.GetRefTyper(key, entity.GetType(), action);
        //}

        //public static Object GetRefObj(this ITyperEntity domainObj, string key, TyperAction action = TyperAction.None)
        //{
        //    var refType = domainObj.GetRefTyper(key, action);

        //    if (refType == null)
        //        return null;

        //    return refType.CreateInstance();
        //}

        public static MethodInfo GetActionMethod(this ITyperRef objRef, TyperAction action)
        {
            return(objRef.GetType().GetActionMethod(action));
        }