public static ICanSetUser SetEntity(ref IApprovalFlow <T> entity) { return(new PhilApprovalFlowEngine <T>(ref entity)); }
/// <summary> /// Attaching PAF Engine to an entity /// </summary> /// <param name="entity"></param> /// <returns></returns> public static ICanSetUser GetApprovalFlow <T>(this IApprovalFlow <T> f) where T : IPAFTransition, new() { return(PhilApprovalFlowEngine <T> .SetEntity(ref f)); }
private PhilApprovalFlowEngine(ref IApprovalFlow <T> entity) { approvalFlowEntity = entity; metadata = entity.GetType().GetCustomAttributes <PAFMetadataAttribute>().ToDictionary(c => c.Key, c => c.Value); }