Esempio n. 1
0
            private T InternableFromJNode(JNode jNode)
            {
                var  name = jNode.Get <String>("name");
                Type type;

                if (!TypeMap.TryGetValue(name, out type))
                {
                    return(null);
                }
                // Deserialize the object
                var vr = (T)jNode.ToObject(type, true);

                return(vr);
            }
Esempio n. 2
0
        private Validator ValidatorFromJNode(JNode jNode)
        {
            var  vrName = jNode.Get <String>("name");
            Type vrType;

            if (!_validatorMap.TryGetValue(vrName, out vrType))
            {
                AddMessage("Unable to create a validator for " + vrName, MessageType.Warning);
                return(null);
            }
            // Deserialize the object
            var vr = (Validator)jNode.ToObject(vrType, true);

            return(vr);
        }