コード例 #1
0
 /// <summary>
 /// Attempts to get the requested fields current or original value and cast to the required type.
 /// </summary>
 /// <param name="field">The field whose value is to be fetched.</param>
 /// <param name="updatedValue">Should the current / updated value be returned or the original value?</param>
 /// <returns>The current or original field value cat to the appropriate type.</returns>
 /// <remarks>Use this method for Struct types only, use GetFieldStringValue() for String fields.</remarks>
 public T GetFieldValue <T>(FormField <TItem> field, bool updatedValue = true) where T : struct
 {
     // point to relevant TItem instance
     if (Item is null)
     {
         return(default);
コード例 #2
0
 public CustomValidateArgs(FormField <TItem> field, TItem?item)
 {
     Field = field;
     Item  = item;
 }