示例#1
0
        /// <summary>
        /// Retrieves the Cache Key for the given Id
        /// </summary>
        /// <typeparam name="T">Type of Resource which derive from
        /// <typeparamref name="Microsoft.Famulus.Core.Resource"/></typeparam>
        /// <param name="id">The id for the key</param>
        /// <param name="feedBy">The associated feedby object</param>
        /// <returns>string format for the key</returns>
        private string GetCacheKey <T>(string name, FeedBy feedBy)
            where T : Core.Resource
        {
            StringBuilder cacheKey = new StringBuilder(FeedHelper.TypeOfResource <T>());

            cacheKey.Append("@");
            cacheKey.Append(feedBy.ToString());
            cacheKey.Append("@");
            cacheKey.Append(name.ToString());
            return(cacheKey.ToString());
        }