Manos.Mvc.HttpModelValueProvider.GetFieldList C# (CSharp) Method

GetFieldList() public method

public GetFieldList ( object model ) : string[]
model object
return string[]
        public string[] GetFieldList(object model)
        {
            // Get the form field that lists the used fields
            string hashed_field_list = GetValue("_Manos_Mvc_FormFields");
            if (hashed_field_list != null)
            {
                // Split between the hash and the field list
                int slashpos = hashed_field_list.IndexOf('/');
                if (slashpos >= 0)
                {
                    // Check the hash matches
                    var hash = hashed_field_list.Substring(0, slashpos);
                    var field_list = hashed_field_list.Substring(slashpos + 1);
                    if (md5.Calculate(m_Context.Application.ServerKey + field_list)==hash)
                    {
                        // All good
                        return field_list.Split(',');
                    }
                }
            }

            // Something up
            return null;
        }