예제 #1
0
        public Type GetType(byte[] item)
        {
            TKey key  = KeyExtractor.Extract(item);
            Type type = Types[key];

            return(type);
        }
예제 #2
0
        public object GetObject(byte[] bytes)
        {
            TKey key = KeyExtractor.Extract(bytes);

            if (key != null && Types.TryGetValue(key, out var foundType) && foundType != null)
            {
                return(_elector.CreateObject(bytes, foundType));
            }

            return(null);
        }