private BuildCacheKey ( MethodInterceptionArgs methodInterceptionArgs ) : string | ||
methodInterceptionArgs | MethodInterceptionArgs | Aspect arguments. |
Résultat | 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();
}