CacheAspect.Repository.CacheAttribute.BuildCacheKey C# (CSharp) Метод

BuildCacheKey() приватный Метод

Build the cache key using the type name, method name and parameter argument values.
private BuildCacheKey ( MethodInterceptionArgs methodInterceptionArgs ) : string
methodInterceptionArgs MethodInterceptionArgs Aspect arguments.
Результат string
        private string BuildCacheKey(MethodInterceptionArgs methodInterceptionArgs)
        {
            const string divider = "_";

            var typeName = GetTypeName(methodInterceptionArgs.Binding.GetType());

            var cacheKey = new StringBuilder();
            cacheKey.Append(typeName);
            cacheKey.Append(divider);
            cacheKey.Append(_methodName);

            foreach (var argument in methodInterceptionArgs.Arguments.ToArray())
            {
                cacheKey.Append(argument == null ? divider : argument.ToString());
            }

            return cacheKey.ToString();
        }