internal static long ComposeGenericTypeCode(Type interfaceType, int baseTypeCode) { if (!interfaceType.IsGenericType) { return(baseTypeCode); } string args = TypeUtils.GetGenericTypeArgs(interfaceType.GetGenericArguments(), t => true); int hash = Utils.CalculateIdHash(args); return((((long)(hash & 0x00FFFFFF)) << 32) + baseTypeCode); }
internal long GetTypeCode(Type interfaceType) { if (interfaceType.IsGenericType && this.IsGeneric) { string args = TypeUtils.GetGenericTypeArgs(interfaceType.GetGenericArguments(), t => true); int hash = Utils.CalculateIdHash(args); return((((long)(hash & 0x00FFFFFF)) << 32) + GrainTypeCode); } else { return(GrainTypeCode); } }