XmlArchive.archiveObject

Archives an object, either a class or an interface.

class XmlArchive(U = char)
void
archiveObject
(,
string type
,
string key
,
Id id
,
void delegate
()
dg
)

Parameters

runtimeType string

the runtime type of the object

type string

the static type of the object

key string

the key associated with the object

id Id

the id associated with the object

dg void delegate
()

a callback that performs the archiving of the individual fields

Examples

class Foo
{
    int a;
}

auto foo = new Foo;

auto archive = new XmlArchive!();
archive.archiveObject(Foo.classinfo.name, "Foo", "foo", 0, {
    // archive the fields of Foo
});

Meta