Example #1
0
        public NhvMapping Parse(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            NhvMapping result = (NhvMapping)serializer.Deserialize(reader);

            // The XmlSerializer not support the OnDeserializedAttribute so the only way
            // we have to manage a sort of Deserialization-Callback is here
            foreach (NhvmClass clas in result.@class)
            {
                clas.rootMapping = result;
            }
            return(result);
        }
 public void AddMapping(NhvMapping mapping)
 {
     if (mapping == null)
     {
         throw new ArgumentNullException("mapping");
     }
     mappings.Add(mapping);
 }