コード例 #1
0
        protected async override Task <string> ProviderJson()
        {
            if (Layouts == null)
            {
                Init(httpContext.RequestServices);
            }
            var dic = new Dictionary <string, string>();

            foreach (var item in Layouts)
            {
                dic.Add(item.ProviderFieldName, await item.ProviderField());
            }

            var json = JObjectHelper.CreateSimpleJson(dic).Replace(Environment.NewLine, string.Empty);

            return(json);
        }