Beispiel #1
0
        public void GetCollectionItems(IXmlNode parentNode, IDictionaryAdapter parentObject, XmlReferenceManager references, IList values)
        {
            var cursor = SelectCollectionItems(parentNode, false);

            while (cursor.MoveNext())
            {
                object value;

                if (IsReference)
                {
                    IXmlNode node = cursor;
                    value = null;
                    object token;

                    if (references.OnGetStarting(ref node, ref value, out token))
                    {
                        value = serializer.GetValue(node, parentObject, this);
                        references.OnGetCompleted(node, value, token);
                    }
                }
                else
                {
                    value = serializer.GetValue(cursor, parentObject, this);
                }
                values.Add(value);
            }
        }
Beispiel #2
0
        public object GetValue(
            IXmlNode node,
            IDictionaryAdapter parentObject,
            XmlReferenceManager references,
            bool nodeExists,
            bool orStub
            )
        {
            object value;

            if ((nodeExists || orStub) && IsReference)
            {
                value = null;
                object token;

                if (references.OnGetStarting(ref node, ref value, out token))
                {
                    value = GetValueCore(node, parentObject, nodeExists, orStub);
                    references.OnGetCompleted(node, value, token);
                }
            }
            else
            {
                value = GetValueCore(node, parentObject, nodeExists, orStub);
            }
            return(value);
        }
Beispiel #3
0
		public void GetCollectionItems(IXmlNode parentNode, IDictionaryAdapter parentObject, XmlReferenceManager references, IList values)
		{
			var cursor = SelectCollectionItems(parentNode, false);

			while (cursor.MoveNext())
			{
				object value;

				if (IsReference)
				{
					IXmlNode node = cursor;
					value = null;
					object token;

					if (references.OnGetStarting(ref node, ref value, out token))
					{
						value = serializer.GetValue(node, parentObject, this);
						references.OnGetCompleted(node, value, token);
					}
				}
				else
				{
					value = serializer.GetValue(cursor, parentObject, this);
				}
				values.Add(value);
			}
		}
Beispiel #4
0
		public object GetValue(IXmlNode node, IDictionaryAdapter parentObject, XmlReferenceManager references, bool nodeExists, bool orStub)
		{
			object value;

			if ((nodeExists || orStub) && IsReference)
			{
				value = null;
				object token;

				if (references.OnGetStarting(ref node, ref value, out token))
				{
					value = GetValueCore(node, parentObject, nodeExists, orStub);
					references.OnGetCompleted(node, value, token);
				}
			}
			else
			{
				value = GetValueCore(node, parentObject, nodeExists, orStub);
			}
			return value;
		}