Alexandria.Client.Infrastructure.PersistentCache.EscapeKey C# (CSharp) Méthode

EscapeKey() private static méthode

private static EscapeKey ( string key ) : string
key string
Résultat string
        private static string EscapeKey(string key)
        {
            foreach (var invalidFileNameChar in Path.GetInvalidFileNameChars())
            {
                var stringToEscape = invalidFileNameChar.ToString();
                var escapedChar = Uri.EscapeDataString(stringToEscape);
                key = key.Replace(stringToEscape, escapedChar);
            }
            return key;
        }