Initial Commit ...
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using xApi.Models;
|
||||
|
||||
namespace xApi.Extensions
|
||||
{
|
||||
public static class ModelExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Validate Configuration Model ...
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsValid(this ApiConfiguration? configuration)
|
||||
{
|
||||
//
|
||||
var result = configuration != null
|
||||
&& !string.IsNullOrWhiteSpace(configuration.Name)
|
||||
&& !string.IsNullOrWhiteSpace(configuration.Version)
|
||||
&& !string.IsNullOrWhiteSpace(configuration.Description);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user