xstream.UnmarshallingContext.StackObject C# (CSharp) Méthode

StackObject() public méthode

public StackObject ( object value ) : void
value object
Résultat void
        public void StackObject(object value) {
            try {
                alreadyDeserialised.Add(reader.CurrentPath, value);
            }
            catch (ArgumentException e) {
                throw new ConversionException(string.Format("Couldn't add path:{0}, value: {1}", reader.CurrentPath, value), e);
            }
        }

Usage Example

        public object UnMarshall(XStreamReader reader, UnmarshallingContext context, Type type)
        {
            var result = context.FindReferenceFromCurrentNode();
            if (result != null) return result;

            if (reader.GetAttribute(XsAttribute.Null) == true.ToString())
                return null;
            result = DynamicInstanceBuilder.CreateInstance(type);
            context.StackObject(result);
            UnmarshalAs(result, type, reader, context);
            return result;
        }
All Usage Examples Of xstream.UnmarshallingContext::StackObject