mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-21 17:13:09 +08:00
23 lines
485 B
C#
23 lines
485 B
C#
using System.Application.Models;
|
|
|
|
namespace System.Application.Models
|
|
{
|
|
/// <summary>
|
|
/// HasValue 接口定义,通常显示实现此接口
|
|
/// </summary>
|
|
public interface IExplicitHasValue
|
|
{
|
|
bool ExplicitHasValue();
|
|
}
|
|
}
|
|
|
|
namespace System
|
|
{
|
|
public static class ExplicitHasValueExtensions
|
|
{
|
|
public static bool HasValue(this IExplicitHasValue? obj)
|
|
{
|
|
return obj != null && obj.ExplicitHasValue();
|
|
}
|
|
}
|
|
} |