ServiceManager/Utility/Helpers/CustomFieldValueHelper.cs
/// <summary>
/// Sets the value of the specified custom field.
/// </summary>
/// <param name="fieldId">The field id.</param>
/// <param name="value">The value.</param>
/// <param name="fieldBuilder">The builder function.</param>
Sets the value of the specified custom field.
Sets the value of the specified custom field .
private CustomFieldRef SetValue<T>(string fieldId, T value, Func<CustomFieldRef> fieldBuilder)
        {
            CustomFieldRef retVal = null;
            if (value != null)
            {
                retVal = fieldBuilder();
                _parent[fieldId] = retVal;
            }
            else if (_parent.ContainsKey(fieldId))
            {
                retVal = _parent[fieldId];
                _parent.Remove(fieldId);
            }
            return retVal;
        }
private CustomFieldRef SetValue < T > ( string fieldId , T value , Func < CustomFieldRef > fieldBuilder ) { CustomFieldRef retVal = null ; if ( value != null ) { retVal = fieldBuilder ( ) ; _parent [ fieldId ] = retVal ; } else if ( _parent . ContainsKey ( fieldId ) ) { retVal = _parent [ fieldId ] ; _parent . Remove ( fieldId ) ; } return retVal ; }
Sets the value of the specified custom field.
Sets the value of the specified custom field .
fieldId
string
The field id.
The field id .
value
T
None
fieldBuilder
Func<CustomFieldRef>
The builder function.
The builder function .