private XElement SerializeEntry(SerializationEntry entry) { var serialized = Serializator.AutoResolve(entry.Value); serialized.SetAttributeValue(XML_ATTRIBUTE_NAME, entry.Name); return(serialized); }
void FirstDimensionResolve(XElement node, Array array, int[] indexator) { var length = array.GetLength(0); for (; indexator[0] < length; indexator[0]++) { node.Add(Serializator.AutoResolve(array.GetValue(indexator))); } }
public override sealed void Serialize(XElement serialized, object obj) { var leng = Fields.Count; for (int i = 0; i < leng; i++) { serialized.Add(Serializator.AutoResolve(Fields[i].GetValue(obj))); } }
public override void Serialize(System.Xml.Linq.XElement serialized, object resolveObject) { var serializationInfo = resolveObject as SerializationInfo; var entryEnumerator = serializationInfo.GetEnumerator(); var entryContainer = new XElement(XML_ELEMENTNAME_ENTRYSCONTAINER); XElement current; while (entryEnumerator.MoveNext()) { current = Serializator.AutoResolve(entryEnumerator.Current.Value); current.Add(new XAttribute(XML_ATTRIBUTENAME_NAME, entryEnumerator.Current.Name)); entryContainer.Add(current); } serialized.Add(entryContainer); }