示例#1
0
        public static MisterConnection <TKey, TValue, TKeyAtomSource, MisterStreamObjectSource> Create <TKey, TValue, TKeyAtomSource>(DirectoryInfo directory, IMisterObjectSerializer <TKey, TKeyAtomSource> keySerializer, IMisterStreamSerializer <TValue> valueStreamSerializer, MisterConnectionSettings settings = null, string name = null, IMisterStreamManager streamManager = null)
            where TKeyAtomSource : struct, IMisterAtomSource <MisterObject>
        {
            streamManager = streamManager ?? MisterArrayPoolStreamManager.Default;
            var valueSerializer = new MisterStreamSerializer <TValue>(valueStreamSerializer, streamManager);

            return(new MisterConnection <TKey, TValue, TKeyAtomSource, MisterStreamObjectSource>(directory, keySerializer, valueSerializer, settings, name));
        }
示例#2
0
 public static MisterConnection <TKey, TValue, TKeyAtomSource, TValueAtomSource> Create <TKey, TValue, TKeyAtomSource, TValueAtomSource>(DirectoryInfo directory, IMisterObjectSerializer <TKey, TKeyAtomSource> keySerializer, IMisterObjectSerializer <TValue, TValueAtomSource> valueSerializer, MisterConnectionSettings settings = null, string name = null)
     where TKeyAtomSource : struct, IMisterAtomSource <MisterObject>
     where TValueAtomSource : struct, IMisterAtomSource <MisterObject>
 {
     return(new MisterConnection <TKey, TValue, TKeyAtomSource, TValueAtomSource>(directory, keySerializer, valueSerializer, settings, name));
 }