Пример #1
0
        private static DictionaryQueryModelDetails GetActionParameterDictionaryDetails(ActionParameter actionParam)
        {
            var key     = nameof(DictionaryQueryModelDetails);
            var details = actionParam.GetAdditionalDataOrDefault <DictionaryQueryModelDetails>(key);

            if (details == null)
            {
                details = new DictionaryQueryModelDetails(actionParam.Type);
                actionParam.SetAdditionalData(key, details);
            }
            return(details);
        }
Пример #2
0
        private CollectionsQueryModelParameterDetails GetDetailsForActionParameter(ActionParameter actionParam)
        {
            string key   = nameof(CollectionsQueryModelParameterDetails);
            var    value = actionParam.GetAdditionalDataOrDefault <CollectionsQueryModelParameterDetails>(key);

            if (value == null)
            {
                value = new CollectionsQueryModelParameterDetails(actionParam.Type);
                actionParam.SetAdditionalData(key, value);
            }
            return(value);
        }