| 123456789101112131415161718192021222324252627282930313233 | 
							- using System;
 
- namespace Houdar.Core.Util.Extension
 
- {
 
-     public static class GuidExtension
 
-     {
 
-         /// <summary>
 
-         /// GuidÊÕËõµ½string
 
-         /// </summary>
 
-         /// <param name="target"></param>
 
-         /// <returns></returns>
 
-         public static string Shrink(this Guid target)
 
-         {
 
-             if (target.IsEmpty()) return "";
 
-             var base64 = Convert.ToBase64String(target.ToByteArray());
 
-             var encoded = base64.Replace("/", "_").Replace("+", "-");
 
-             return encoded.Substring(0, 22);
 
-         }
 
-         /// <summary>
 
-         /// GuidÊÇ·ñΪ¿Õ
 
-         /// </summary>
 
-         /// <param name="target"></param>
 
-         /// <returns></returns>
 
-         public static bool IsEmpty(this Guid target)
 
-         {
 
-             return target == Guid.Empty;
 
-         }
 
-     }
 
- }
 
 
  |