This commit is contained in:
2022-12-16 06:01:23 +00:00
parent 26c2ae5cc9
commit effd96143f
310 changed files with 48715 additions and 0 deletions

51
server/biz/IBizObject.cs Normal file
View File

@@ -0,0 +1,51 @@
using System.Collections.Generic;
namespace Sockeye.Biz
{
/// <summary>
///
/// </summary>
internal interface IBizObject
{
//validate via validation attributes
//https://stackoverflow.com/questions/36330981/is-the-validationresult-class-suitable-when-validating-the-state-of-an-object
/// <summary>
/// Contains list of errors
/// </summary>
List<ValidationError> Errors { get; }
/// <summary>
/// Is true if there are errors
/// </summary>
bool HasErrors { get; }
/// <summary>
/// Is true if the field specified exists in the list
/// </summary>
bool PropertyHasErrors(string propertyName);
/// <summary>
///
/// </summary>
/// <param name="errorCode"></param>
/// <param name="errorMessage"></param>
/// <param name="propertyName"></param>
void AddError(ApiErrorCode errorCode, string propertyName = null, string errorMessage = null);
// /// <summary>
// ///
// /// </summary>
// /// <param name="validationError"></param>
// void AddvalidationError(ValidationError validationError);
}
}