Пример #1
0
        public void AppendTo(StringBuffer stringBuffer, byte *valuePtr, StringView format)
        {
            if (!UnmanagedCache.TryGetFormatter(_typeHandle, out var formatter))
            {
                AppendUnformattedTo(stringBuffer, valuePtr);
                return;
            }

            formatter(stringBuffer, valuePtr, format);
        }
Пример #2
0
 public static void RegisterUnmanaged <T>()
     where T : unmanaged, IStringFormattable
 => UnmanagedCache.Register <T>();
Пример #3
0
 public static void RegisterUnmanaged <T>(UnmanagedFormatterDelegate <T> formatter)
     where T : unmanaged
 => UnmanagedCache.Register(formatter);
Пример #4
0
 public static void RegisterUnmanaged([NotNull] Type type)
 => UnmanagedCache.Register(type);