RpcSystemAssetTracker/CronContractInvoker.cs
/// <summary>
/// SC parameter helper function.
/// Firstly tries to get SC parameter from type/value,
/// then from raw value
/// </summary>
/// <param name="cp">destination SC parameter</param>
/// <param name="jObj">source JObject value </param>
/// 
SC parameter helper function.
Firstly tries to get SC parameter from type/value,
then from raw value
SC parameter helper function . Firstly tries to get SC parameter from type / value then from raw value
private void SetContractParamValue(ContractParameter cp, JObject jObj)
        {
            try
            {
                var cpx = ContractParameter.FromJson(jObj);
                if (cp.Type == cpx.Type)
                {
                    cp.Value = cpx.Value;
                    return;
                }
            }
            catch (Exception ex)
            {
            }
            SetFromJsonRaw(cp, jObj);
        }
private void SetContractParamValue ( ContractParameter cp , JObject jObj ) { try { var cpx = ContractParameter . FromJson ( jObj ) ; if ( cp . Type == cpx . Type ) { cp . Value = cpx . Value ; return ; } } catch ( Exception ex ) { } SetFromJsonRaw ( cp , jObj ) ; }
SC parameter helper function.
SC parameter helper function .
// Ignore all possible exceptions, // then treat raw value without { type, value } object 
cp
ContractParameter
destination SC parameter
destination SC parameter
jObj
JObject
source JObject value
source JObject value