private static void InitAttrMethods(Type type) { MethodInfo[] memberInfos = type.GetMethods(); if (memberInfos != null) { foreach (var item in memberInfos) { string name = item.Name; bool bStatus = item.IsDefined(typeof(WorkFlowAttribute), true); if (bStatus) { EndFlowDelegate endFlowDelegate = (EndFlowDelegate)Delegate.CreateDelegate(typeof(EndFlowDelegate), item); RegisteredEndActive(endFlowDelegate); } } } }
public static void RegisteredEndActive(EndFlowDelegate action) { WorkFlowApp.EndFlowEvent += action; }