コード例 #1
0
 /// <summary>
 /// Builds and returns a <see cref="Reportable"/> from the state of the current instance.
 /// </summary>
 /// <returns>The performance.</returns>
 public Reportable GetReportable()
 {
     return(new Reportable {
         ActorName = Actor?.Name ?? "<actor name missing>",
         Category = PerformanceType,
         Error = (Exception != null)? objectFormatter.FormatForReport(Exception) : null,
         Result = (Result != null)? objectFormatter.FormatForReport(Result) : null,
         Report = Performable?.GetReport(Actor) ?? "<report data missing>",
         Reportables = Reportables,
         Type = GetOutcome(),
     });
 }
コード例 #2
0
 /// <summary>
 /// Returns a <c>System.String</c> that represents the current <see cref="FailureReport"/>.
 /// </summary>
 /// <returns>A <c>System.String</c> that represents the current <see cref="FailureReport"/>.</returns>
 public override string ToString()
 {
     return($"FAILURE: {Performable.GetReport(Actor)}");
 }
コード例 #3
0
        /// <summary>
        /// Returns a <c>System.String</c> that represents the current <see cref="ResultReport"/>.
        /// </summary>
        /// <returns>A <c>System.String</c> that represents the current <see cref="ResultReport"/>.</returns>
        public override string ToString()
        {
            var resultString = (Result != null)? Result.ToString() : "<null>";

            return($"RESULT:  {Performable.GetReport(Actor)} : {resultString}");
        }
コード例 #4
0
 /// <summary>
 /// Returns a <c>System.String</c> that represents the current <see cref="SuccessReport"/>.
 /// </summary>
 /// <returns>A <c>System.String</c> that represents the current <see cref="SuccessReport"/>.</returns>
 public override string ToString()
 {
     return($"SUCCESS: {Performable.GetReport(Actor)}");
 }