Open sandboxFocus

Method CompressKey

CompressKey(UnsafeStringBuilder, bool, int)

Compresses the key is necessary.

Declaration
protected virtual string CompressKey(UnsafeStringBuilder stringBuilder, bool useMethodNameAsPrefix, int threshold)
Parameters
Type Name Description
UnsafeStringBuilder stringBuilder

The uncompressed key.

bool useMethodNameAsPrefix

true if the key is from BuildMethodKey(MethodInfo, IList<object>, object), false when it is from BuildDependencyKey(object). In method keys, the method name is kept as a prefix, but parameters and type parameters are stripped.

int threshold

The minimal key lenght above which

Returns
Type Description
string

The compressed key.