Example #1
0
 /// <summary>
 /// Get value <br />
 /// 获取值
 /// </summary>
 /// <param name="context"></param>
 /// <typeparam name="TVal"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 public static TVal GetValue <TVal>(this VerifiableMemberContext context)
 {
     if (context is null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return(context.Value.As <TVal>());
 }
Example #2
0
 /// <summary>
 /// Get value <br />
 /// 获取值
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 public static object GetValue(this VerifiableMemberContext context)
 {
     if (context is null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return(context.Value);
 }