C# Class System.Xml.Serialization.SerializationCodeGenerator

Mostrar archivo Open project: kumpera/mono Class Usage Examples

Public Methods

Method Description
Generate ( string configFileName, string outputPath ) : void
GenerateContract ( ArrayList generatedMaps ) : void
GenerateReader ( string readerClassName, ArrayList maps ) : void
GenerateSerializers ( TextWriter writer ) : void
GenerateWriter ( string writerClassName, ArrayList maps ) : void
SerializationCodeGenerator ( XmlMapping xmlMaps ) : System.IO
SerializationCodeGenerator ( XmlMapping xmlMaps, System.Xml.Serialization.SerializerInfo config ) : System.IO

Private Methods

Method Description
GenerateAddListValue ( TypeData listType, string list, string index, string value, bool canCreateInstance ) : void
GenerateCreateList ( Type listType ) : string
GenerateEndHook ( ) : void
GenerateFillerCallbacks ( ) : void
GenerateFixupCallbacks ( ) : void
GenerateGetArrayType ( ListMap map, string itemCount, string &localName, string &ns ) : void
GenerateGetEnumValue ( XmlTypeMapping typeMap, string val, bool isNullable ) : string
GenerateGetEnumValueMethod ( XmlTypeMapping typeMap ) : void
GenerateGetEnumXmlValue ( XmlTypeMapping typeMap, string ob ) : string
GenerateGetListCount ( TypeData listType, string ob ) : string
GenerateGetMemberValue ( System.Xml.Serialization.XmlTypeMapMember member, string ob, bool isValueList ) : string
GenerateGetSingleEnumValue ( XmlTypeMapping typeMap, string val ) : void
GenerateGetStringValue ( XmlTypeMapping typeMap, TypeData type, string value, bool isNullable ) : string
GenerateGetValueFromXmlString ( string value, TypeData typeData, XmlTypeMapping typeMap, bool isNullable ) : string
GenerateGetXmlEnumValue ( XmlTypeMapping map ) : void
GenerateHook ( HookType hookType, System.Xml.Serialization.XmlMappingAccess dir, Type type, string member ) : bool
GenerateHooks ( HookType hookType, System.Xml.Serialization.XmlMappingAccess dir, Type type, string member, HookAction action ) : bool
GenerateInitializeList ( TypeData listType ) : string
GenerateListLoop ( string container, ListMap map, string item, string index, TypeData itemTypeData, string targetString ) : void
GenerateMemberHasValueCondition ( System.Xml.Serialization.XmlTypeMapMember member, string ob, bool isValueList ) : string
GenerateReadArrayMemberHook ( Type type, System.Xml.Serialization.XmlTypeMapMember member, string index ) : bool
GenerateReadAttributeMembers ( XmlMapping xmlMap, ClassMap map, string ob, bool isValueList, bool &first ) : void
GenerateReadClassInstance ( XmlTypeMapping typeMap, string isNullable, string checkType ) : void
GenerateReadEnumElement ( XmlTypeMapping typeMap, string isNullable ) : void
GenerateReadHook ( HookType hookType, Type type ) : bool
GenerateReadInitCallbacks ( ) : void
GenerateReadListElement ( XmlTypeMapping typeMap, string list, string isNullable, bool canCreateInstance ) : string
GenerateReadListString ( XmlTypeMapping typeMap, string values ) : string
GenerateReadMemberHook ( Type type, System.Xml.Serialization.XmlTypeMapMember member ) : bool
GenerateReadMembers ( XmlMapping xmlMap, ClassMap map, string ob, bool isValueList, bool readByOrder ) : void
GenerateReadMessage ( XmlMembersMapping typeMap ) : string
GenerateReadObject ( XmlTypeMapping typeMap ) : void
GenerateReadObjectElement ( System.Xml.Serialization.XmlTypeMapElementInfo elem ) : string
GenerateReadPrimitiveElement ( XmlTypeMapping typeMap, string isNullable ) : void
GenerateReadPrimitiveValue ( System.Xml.Serialization.XmlTypeMapElementInfo elem ) : string
GenerateReadRoot ( ) : void
GenerateReadXmlNodeElement ( XmlTypeMapping typeMap, string isNullable ) : void
GenerateReadXmlSerializableElement ( XmlTypeMapping typeMap, string isNullable ) : void
GenerateSetListMembersDefaults ( XmlTypeMapping typeMap, ClassMap map, string ob, bool isValueList ) : void
GenerateSetMemberValue ( System.Xml.Serialization.XmlTypeMapMember member, string ob, string value, bool isValueList ) : void
GenerateSetMemberValueFromAttr ( System.Xml.Serialization.XmlTypeMapMember member, string ob, string value, bool isValueList ) : void
GenerateWriteAnyElementContent ( System.Xml.Serialization.XmlTypeMapMemberAnyElement member, string memberValue ) : void
GenerateWriteEnumElement ( XmlTypeMapping typeMap, string ob ) : void
GenerateWriteHook ( HookType hookType, Type type ) : bool
GenerateWriteInitCallbacks ( ) : void
GenerateWriteListContent ( string container, TypeData listType, ListMap map, string ob, bool writeToString ) : string
GenerateWriteListElement ( XmlTypeMapping typeMap, string ob ) : void
GenerateWriteMemberElement ( System.Xml.Serialization.XmlTypeMapElementInfo elem, string memberValue ) : void
GenerateWriteMemberHook ( Type type, System.Xml.Serialization.XmlTypeMapMember member ) : bool
GenerateWriteMessage ( XmlMembersMapping membersMap ) : void
GenerateWriteObject ( XmlTypeMapping typeMap ) : void
GenerateWriteObjectElement ( XmlMapping xmlMap, string ob, bool isValueList ) : void
GenerateWritePrimitiveElement ( XmlTypeMapping typeMap, string ob ) : void
GenerateWritePrimitiveValueEncoded ( string memberValue, string name, string ns, XmlQualifiedName xsiType, XmlTypeMapping mappedType, TypeData typeData, bool wrapped, bool isNullable ) : void
GenerateWritePrimitiveValueLiteral ( string memberValue, string name, string ns, XmlTypeMapping mappedType, TypeData typeData, bool wrapped, bool isNullable ) : void
GenerateWriteRoot ( ) : void
GetArrayDeclaration ( Type type, string length ) : string
GetBoolTempVar ( ) : string
GetCast ( Type td, string val ) : string
GetCast ( TypeData td, TypeData tdval, string val ) : string
GetCast ( TypeData td, string val ) : string
GetFillListName ( TypeData td ) : string
GetFixupCallbackName ( XmlMapping typeMap ) : string
GetGetEnumValueName ( XmlTypeMapping typeMap ) : string
GetLiteral ( object ob ) : string
GetNumTempVar ( ) : string
GetObTempVar ( ) : string
GetReadObjectCall ( XmlTypeMapping typeMap, string isNullable, string checkType ) : string
GetReadObjectName ( XmlTypeMapping typeMap ) : string
GetReadXmlNode ( TypeData type, bool wrapped ) : string
GetRootTypeName ( ) : string
GetStrTempVar ( ) : string
GetTypeOf ( Type td ) : string
GetTypeOf ( TypeData td ) : string
GetUniqueClassName ( string s ) : string
GetUniqueName ( string uniqueGroup, object ob, string name ) : string
GetWriteObjectCallbackName ( XmlTypeMapping typeMap ) : string
GetWriteObjectName ( XmlTypeMapping typeMap ) : string
InitHooks ( ) : void
IsReadOnly ( XmlTypeMapping map, System.Xml.Serialization.XmlTypeMapMember member, TypeData memType, bool isValueList ) : bool
MemberHasReadReplaceHook ( Type type, System.Xml.Serialization.XmlTypeMapMember member ) : bool
Params ( ) : string
PopHookContext ( ) : void
PushHookContext ( ) : void
RegisterReferencingMap ( XmlTypeMapping typeMap ) : void
SetHookVar ( string var, string value ) : void
ToCSharpFullName ( Type type ) : string
Unindent ( ) : void
UpdateGeneratedTypes ( ArrayList list ) : void
Write ( string code ) : void
WriteLine ( string code ) : void
WriteLineInd ( string code ) : void
WriteLineUni ( string code ) : void
WriteMetCall ( string method ) : void
WriteMultilineCode ( string code ) : void
WriteUni ( string code ) : void
WriteWriteEnumCallback ( XmlTypeMapping map ) : void
WriteWriteObjectCallback ( XmlTypeMapping map ) : void

Method Details

Generate() public static method

public static Generate ( string configFileName, string outputPath ) : void
configFileName string
outputPath string
return void

GenerateContract() public method

public GenerateContract ( ArrayList generatedMaps ) : void
generatedMaps System.Collections.ArrayList
return void

GenerateReader() public method

public GenerateReader ( string readerClassName, ArrayList maps ) : void
readerClassName string
maps System.Collections.ArrayList
return void

GenerateSerializers() public method

public GenerateSerializers ( TextWriter writer ) : void
writer System.IO.TextWriter
return void

GenerateWriter() public method

public GenerateWriter ( string writerClassName, ArrayList maps ) : void
writerClassName string
maps System.Collections.ArrayList
return void

SerializationCodeGenerator() public method

public SerializationCodeGenerator ( XmlMapping xmlMaps ) : System.IO
xmlMaps XmlMapping
return System.IO

SerializationCodeGenerator() public method

public SerializationCodeGenerator ( XmlMapping xmlMaps, System.Xml.Serialization.SerializerInfo config ) : System.IO
xmlMaps XmlMapping
config System.Xml.Serialization.SerializerInfo
return System.IO