Exemple #1
0
 /// <summary>
 /// 【用于分布式】
 /// </summary>
 /// <param name="sourceString"></param>
 /// <returns></returns>
 internal static string GetHashKey(string sourceString)
 {
     if (string.IsNullOrEmpty(sourceString))
     {
         return("K" + HashCreator.Create(sourceString));
     }
     return("K" + HashCreator.Create(sourceString) + sourceString.Length);
 }
 /// <summary>
 /// 【用于分布式】根据字符串获取相应的HashCode
 /// </summary>
 /// <param name="key">字符串</param>
 /// <returns></returns>
 public static uint GetHashCode(string key)
 {
     return(HashCreator.Create(key));
 }
Exemple #3
0
 /// <summary>
 /// 【用于分布式】
 /// </summary>
 /// <param name="sourceString"></param>
 /// <returns></returns>
 internal static string GetHashKey(string sourceString)
 {
     return(HashCreator.CreateKey(sourceString));
 }