Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OperationResult&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <param name="resultType">Type of the result.</param>
 /// <param name="message">The message.</param>
 /// <param name="stackTrace">The stack trace.</param>
 private OperationResult(T data, OperationResultType resultType, string message, string stackTrace, AdminPortalValidationResult validationResult)
 {
     this.Data             = data;
     this.ResultType       = resultType;
     this.Message          = message;
     this.StackTrace       = stackTrace;
     this.ValidationResult = validationResult;
 }
Exemplo n.º 2
0
 public static OperationResult <T> CreateFailureResult(AdminPortalValidationResult validationResult)
 {
     return(new OperationResult <T>(default(T), OperationResultType.Failure, string.Empty, string.Empty, validationResult));
 }