Exemple #1
0
 /// <summary>
 /// Checks if varyByAll is set
 /// </summary>
 /// <param name="varyBy">varyBy string</param>
 /// <returns>true if varyByAll, false otherwise</returns>
 private bool VaryByAll(string varyBy)
 {
     if (!NOutputCache.IsNullOrEmpty(varyBy))
     {
         return(varyBy.Trim() == "*");
     }
     return(false);
 }
Exemple #2
0
        /// <summary>
        /// Parse varyBy
        /// </summary>
        /// <param name="varyBy">varyBy string</param>
        /// <returns>varyBy array</returns>
        private string[] VaryBy(string varyBy)
        {
            string[] varyByArray = new string[0];

            if (!NOutputCache.IsNullOrEmpty(varyBy))
            {
                varyByArray = varyBy.Trim().Split(',');

                ///Trim the result, incase there are spaces
                for (int i = 0; i < varyByArray.Length; i++)
                {
                    varyByArray[i] = varyByArray[i].Trim();
                }
            }

            return(varyByArray);
        }