Source/NFX/Glue/Protocol/Specifiers.cs
/// <summary>
/// Returns stable ulong hash for a type that does not depend on a platform
/// </summary>
Returns stable ulong hash for a type that does not depend on a platform
Returns stable ulong hash for a type that does not depend on a platform
public static ulong TypeHash(Type type)
        {
          if (type==null) return 0;
          if (type==typeof(void)) return 0;
          var aqn = type.AssemblyQualifiedName;
          var crc32 = NFX.IO.ErrorHandling.CRC32.ForString(aqn);
          var tp  = StringIDHash(type.FullName);
          return tp ^ ( ((ulong)crc32) << 24);
        }
public static ulong TypeHash ( Type type ) { if ( type == null ) return 0 ; if ( type == typeof ( void ) ) return 0 ; var aqn = type . AssemblyQualifiedName ; var crc32 = NFX . IO . ErrorHandling . CRC32 . ForString ( aqn ) ; var tp = StringIDHash ( type . FullName ) ; return tp ^ ( ( ( ulong ) crc32 ) << 24 ) ; }
Returns stable ulong hash for a type that does not depend on a platform
Returns stable ulong hash for a type that does not depend on a platform
//64-8-32 //[tp.len%251][crc1][crc2][crc3][crc4][char-3][char-2][char-1]
type
Type