public bool TryDeserialize()

in Source/Tx.Core/PartitionKeyDeserializer.cs [41:69]


        public bool TryDeserialize(TInput value, out Timestamped<object> ts)
        {
            TKey key = _typeMap.GetInputKey(value);
            ts = default(Timestamped<object>);

            Func<TInput, object> transform;
            if (key == null || !_transforms.TryGetValue(key, out transform))
                return false;

            if (transform == null)
            {
                Type type = _knownTypes[key];
                transform = _typeMap.GetTransform(type);
                if (transform == null)
                    return false;

                _transforms[key] = transform;
            }

            object o = transform(value);

            if (o != null)
            {
                ts = new Timestamped<object>(o, _timeFunction(value));
                return true;
            }

            return false;
        }