Exemplo n.º 1
0
 protected virtual XElement SerializeWithPropertyParser(IXmlObjectModelPropertyParser propertyParser, object obj)
 {
     var element = new XElement("obj");
     var mirrorObjectModel = new MirrorObjectModel(obj);
     var properties = mirrorObjectModel.GetProperties();
     foreach (var property in properties)
     {
         propertyParser.DefineProperty(element, property.Name, property.Type, property.Value, property.ReadOnly);
     }
     return element;
 }
Exemplo n.º 2
0
        public override void Export(IXmlObject obj, XElement target)
        {
            var mirror = new MirrorObjectModel(obj);

            //var properties = target.GetProperties();
            var properties = mirror.GetProperties();
            foreach (var property in properties)
            {
                if (property == null)
                    continue;
                GetOrUpdateProperty(target, property);
            }
        }
Exemplo n.º 3
0
 protected override IObjectModel CreateObjectModel(object args)
 {
     var objectModel = new MirrorObjectModel(args);
     return objectModel;
 }