Example #1
0
		public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value)
		{
			if (node.ClrType != typeof(object))
				XmlTypeSerializer.For(node.ClrType).SetValue(node, parent, accessor, oldValue, ref value);
			else
				node.Clear();
		}
Example #2
0
 public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value)
 {
     if (node.ClrType != typeof(object))
     {
         XmlTypeSerializer.For(node.ClrType).SetValue(node, parent, accessor, oldValue, ref value);
     }
     else
     {
         node.Clear();
     }
 }
Example #3
0
 private void AddReference(IXmlNode node, Entry entry)
 {
     if (!entry.Node.PositionEquals(node))
     {
         if (entry.References == null)
         {
             GenerateId(entry);
             format.SetIdentity(entry.Node, entry.Id);
         }
         node.Clear();
         entry.AddReference(node);
         format.SetReference(node, entry.Id);
     }
 }
Example #4
0
File: Xsi.cs Project: belav/Core
        public static void SetXsiNil(this IXmlNode node, bool nil)
        {
            string value;

            if (nil)
            {
                node.Clear();
                value = NilValue;
            }
            else
            {
                value = null;
            }
            node.SetAttribute(Xsi.Nil, value);
        }
 public override void WriteStartElement(string prefix, string localName, string ns)
 {
     try
     {
         if (IsInRoot)
         {
             ChildWriter.WriteStartElement(prefix, localName, ns);
             state = WriteState.Content;
         }
         else // is in prolog
         {
             RequireState(WriteState.Start, WriteState.Prolog);
             node.Clear();
             state = WriteState.Element;
         }
         depth++;
     }
     catch { Reset(WriteState.Error); throw; }
 }
Example #6
0
		private void AddReference(IXmlNode node, Entry entry)
		{
			if (!entry.Node.PositionEquals(node))
			{
				if (entry.References == null)
				{
					GenerateId(entry);
					format.SetIdentity(entry.Node, entry.Id);
				}
				node.Clear();
				entry.AddReference(node);
				format.SetReference(node, entry.Id);
			}
		}
Example #7
0
 public void Clear()
 {
     node.Clear();
 }