/// <summary>
        /// Gets a Gigya value from the model.
        /// </summary>
        /// <param name="gigyaModel">Deserialized Gigya JSON object.</param>
        /// <param name="gigyaFieldName">Gigya field name e.g. profile.age</param>
        /// <returns></returns>
        protected object GetGigyaValue(dynamic gigyaModel, string gigyaFieldName, string cmsFieldName)
        {
            var eventArgs = new MapGigyaFieldEventArgs
            {
                GigyaModel     = gigyaModel,
                GigyaFieldName = gigyaFieldName,
                CmsFieldName   = cmsFieldName,
                Origin         = "GetGigyaValue",
                GigyaValue     = DynamicUtils.GetValue <object>(gigyaModel, gigyaFieldName)
            };

            GettingGigyaValue?.Invoke(this, eventArgs);
            return(eventArgs.GigyaValue);
        }
Exemple #2
0
 public void RaiseGettingGigyaValue(object sender, MapGigyaFieldEventArgs e)
 {
     GettingGigyaValue?.Invoke(sender, e);
 }