void GenerateWriteInitCallbacks ()
{
WriteLine ("protected override void InitCallbacks ()");
WriteLineInd ("{");
if (_format == SerializationFormat.Encoded)
{
foreach (XmlMapping xmap in _mapsToGenerate) {
XmlTypeMapping map = xmap as XmlTypeMapping;
if (map != null)
WriteMetCall ("AddWriteCallback", GetTypeOf(map.TypeData), GetLiteral(map.XmlType), GetLiteral(map.Namespace), "new XmlSerializationWriteCallback (" + GetWriteObjectCallbackName (map) + ")");
}
}
WriteLineUni ("}");
WriteLine ("");
if (_format == SerializationFormat.Encoded)
{
foreach (XmlTypeMapping xmap in _mapsToGenerate) {
XmlTypeMapping map = xmap as XmlTypeMapping;
if (map == null) continue;
if (map.TypeData.SchemaType == SchemaTypes.Enum)
WriteWriteEnumCallback (map);
else
WriteWriteObjectCallback (map);
}
}
}