using System;

namespace Core.Util
{
    public static partial class Extention
    {
        /// <summary>
        ///Convert to an ordered GUID
        ///Note: Contains 50 characters
        /// </summary>
        /// <param name="guid">A new GUID</param>
        /// <returns></returns>
        public static string ToSequentialGuid(this Guid guid)
        {
            var timeStr = (DateTime.Now.ToCstTime().Ticks / 10000).ToString("x8");
            var newGuid = $"{timeStr.PadLeft(13.'0')}-{guid}";

            returnnewGuid; }}}Copy the code