private string SerializeObject <TWorkStepMessage>(TaskschedNode task, TWorkStepMessage message) where TWorkStepMessage : IWorkStepMessage { SetTaskId <TWorkStepMessage> .Register().Invoke(message, task.TaskId); var msg = new Never.Messages.MessagePacket() { Body = this.workflowengine.JsonSerializer.SerializeObject(message), ContentType = Never.Messages.MessagePacket.GetContentType(message), }; return(this.workflowengine.JsonSerializer.SerializeObject(msg)); }
public static void MySetId<TWorkStepMessage>(IWorkStepMessage message, TaskschedNode task) { SetTaskId<TWorkStepMessage>.Register().Invoke((TWorkStepMessage)message, task.TaskId); }
/// <summary> /// /// </summary> /// <typeparam name="TWorkStepMessage"></typeparam> /// <param name="message"></param> /// <param name="task"></param> private void SetMessageTaskId<TWorkStepMessage>(TWorkStepMessage message, TaskschedNode task) where TWorkStepMessage : IWorkStepMessage { SetTaskId.SetId(message, task); }