C# Класс SimpleFramework.Xml.Stream.CamelCaseStyle

The CamelCaseStyle is used to represent an XML style that can be applied to a serialized object. A style can be used to modify the element and attribute names for the generated document. This styles can be used to generate camel case XML. <ExampleElement> <ChildElement exampleAttribute='example'> <InnerElement>example</InnerElement> </ChildElement> </ExampleElement> Above the camel case XML elements and attributes can be generated from a style implementation. Styles enable the same objects to be serialized in different ways, generating different styles of XML without having to modify the class schema for that object.
Наследование: Style
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CamelCaseStyle ( ) : System

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. By default the elements have an upper case initial character and a lower case attribute.

CamelCaseStyle ( bool element ) : System

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. By default the attributes have a lower case initial character and an configurable element.

CamelCaseStyle ( bool element, bool attribute ) : System

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. Both the attribute an elements are configurable.

GetAttribute ( String name ) : String

This is used to generate the XML attribute representation of the specified name. Attribute names should ensure to keep the uniqueness of the name such that two different names will be styled in to two different strings.

GetElement ( String name ) : String
SetAttribute ( String name, String value ) : void

This is used to set the attribute values within this builder. Overriding the attribute values ensures that the default algorithm does not need to determine each of the values. It allows special behaviour that the user may require for XML.

SetElement ( String name, String value ) : void

This is used to set the element values within this builder. Overriding the element values ensures that the default algorithm does not need to determine each of the values. It allows special behaviour that the user may require for XML.

Описание методов

CamelCaseStyle() публичный Метод

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. By default the elements have an upper case initial character and a lower case attribute.
public CamelCaseStyle ( ) : System
Результат System

CamelCaseStyle() публичный Метод

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. By default the attributes have a lower case initial character and an configurable element.
public CamelCaseStyle ( bool element ) : System
element bool /// if true the element will start as upper case ///
Результат System

CamelCaseStyle() публичный Метод

Constructor for the CamelCaseStyle object. This is used to create a style that will create camel case XML attributes and elements allowing a consistent format for generated XML. Both the attribute an elements are configurable.
public CamelCaseStyle ( bool element, bool attribute ) : System
element bool /// if true the element will start as upper case ///
attribute bool /// if true the attribute starts as upper case ///
Результат System

GetAttribute() публичный Метод

This is used to generate the XML attribute representation of the specified name. Attribute names should ensure to keep the uniqueness of the name such that two different names will be styled in to two different strings.
public GetAttribute ( String name ) : String
name String /// this is the attribute name that is to be styled ///
Результат String

GetElement() публичный Метод

public GetElement ( String name ) : String
name String /// this is the element name that is to be styled ///
Результат String

SetAttribute() публичный Метод

This is used to set the attribute values within this builder. Overriding the attribute values ensures that the default algorithm does not need to determine each of the values. It allows special behaviour that the user may require for XML.
public SetAttribute ( String name, String value ) : void
name String /// the name of the XML attribute to be overridden ///
value String /// the value that is to be used for that attribute ///
Результат void

SetElement() публичный Метод

This is used to set the element values within this builder. Overriding the element values ensures that the default algorithm does not need to determine each of the values. It allows special behaviour that the user may require for XML.
public SetElement ( String name, String value ) : void
name String /// the name of the XML element to be overridden ///
value String /// the value that is to be used for that element ///
Результат void