public static IUnsafeMarshaller <Dictionary <TKey, TValue> > GetDictionaryMarshaller <TKey, TValue>( IUnsafeMarshaller <TKey> keyMarshaller, IUnsafeMarshaller <TValue> valueMarshaller ) => UnsafeMarshallers.GetCollectionMarshaller( GetKeyValuePairMarshaller(keyMarshaller, valueMarshaller), size => new Dictionary <TKey, TValue>(size) );
private static IUnsafeMarshaller <Dictionary <string, string> > CreateMarshaller() { return(UnsafeMarshallers.GetCollectionMarshaller( reader => new KeyValuePair <string, string>(reader.ReadString(), reader.ReadString()), (writer, value) => { writer.Write(value.Key); writer.Write(value.Value); }, n => new Dictionary <string, string>(n))); }
private static IUnsafeMarshaller <JetHashSet <UnityEventHandlerCacheItem> > CreateMarshaller() { return(UnsafeMarshallers.GetCollectionMarshaller(UnityEventHandlerCacheItem.Marshaller, n => new JetHashSet <UnityEventHandlerCacheItem>(n))); }