示例#1
0
 public IEnumerable SetData(object data = null, string key = "default")
 {
     if (data != null)
     {
         ResultUtility.SetData(Result, data, key);
         if (!(data is IEnumerable list))
         {
             list = new object[] { data }
         }
         ;
         return(list);
     }
     else
     {
         return(ResultUtility.GetData(Result, key));
     }
 }
示例#2
0
        public string CreateTag(string tagName, IDictionary <object, object> attributes = null, string innerHtml = null)
        {
            string result = ResultUtility.CreateTag(Result, tagName, attributes, innerHtml);

            return(result);
        }
示例#3
0
 public void SetHeader(string name, string text = null, string type = null, string key = "default")
 {
     ResultUtility.SetHeader(Result, name, text, type, key);
 }