Example #1
0
        /// <summary>
        /// Add or update a parameter's value
        /// </summary>
        /// <param name="paramDef">Frame parameter definition (<see cref="FrameParamDef"/> class)</param>
        /// <param name="value">Value (dynamic)</param>
        private FrameParams AddUpdateValueDynamic(FrameParamDef paramDef, dynamic value)
        {
            if (Values.TryGetValue(paramDef.ParamType, out var paramEntry))
            {
                paramEntry.Value = value;
            }
            else
            {
                paramEntry = new FrameParam(paramDef, value);
                Values.Add(paramDef.ParamType, paramEntry);
            }

            return(this);
        }
Example #2
0
        /// <summary>
        /// Add or update a parameter's value
        /// </summary>
        /// <param name="paramType">Parameter type</param>
        /// <param name="value">Value (dynamic)</param>
        private FrameParams AddUpdateValueDynamic(FrameParamKeyType paramType, dynamic value)
        {
            if (Values.TryGetValue(paramType, out var paramEntry))
            {
                paramEntry.Value = value;
            }
            else
            {
                paramEntry = new FrameParam(FrameParamUtilities.GetParamDefByType(paramType), value);
                Values.Add(paramType, paramEntry);
            }

            UpdateCachedParam(paramType, value);

            return(this);
        }