public static ActivityResult GetSuccess(string messageFormat, params object[] args) { var result = new ActivityResult(); result.Messages.Add(WarningLevel.Information, messageFormat, args); return(result); }
public static ActivityResult GetError(string messageFormat, params object[] args) { var result = new ActivityResult(); if (!string.IsNullOrEmpty(messageFormat)) { result.Messages.Add(WarningLevel.Critical, messageFormat, args); } result.Success = false; return(result); }
public void Merge(ActivityResult result) { Success &= result.Success; Messages.AddRange(result.Messages); }