예제 #1
0
        public override Func <ObjectProperties, object> GetDeserializerFunc(SerializerInstanceStore instanceStore)
        {
            object instance = null;

            if (!_methodInfo.IsStatic)
            {
                instance = instanceStore.GetInstance(_methodInfo.DeclaringType);
            }

            return((objects) =>
                   _targetType == null
                    ? _methodInfo.Invoke(instance, new object[] { new ShapeshifterReader(objects) })
                    : _methodInfo.Invoke(instance, new object[] { new ShapeshifterReader(objects), _targetType }));
        }
예제 #2
0
 public override Func <ObjectProperties, object> GetDeserializerFunc(SerializerInstanceStore instanceStore)
 {
     return(Deserialize);
 }
예제 #3
0
 /// <summary>
 ///     Override should return a function which based on the given <see cref="ObjectProperties" />, using the given
 ///     <see cref="ValueConverter" />
 ///     builds up the deserialized value.
 /// </summary>
 public abstract Func <ObjectProperties, object> GetDeserializerFunc(SerializerInstanceStore instanceStore);