コード例 #1
0
        public static ActivityResult GetSuccess(string messageFormat, params object[] args)
        {
            var result = new ActivityResult();

            result.Messages.Add(WarningLevel.Information, messageFormat, args);
            return(result);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Merge(ActivityResult result)
 {
     Success &= result.Success;
     Messages.AddRange(result.Messages);
 }