C# 클래스 Company.OrmLanguage.EntityHasReferencesSerializer

Serializer EntityHasReferencesSerializer for DomainClass EntityHasReferences.
상속: DslModeling::DomainRelationshipXmlSerializer
파일 보기 프로젝트 열기: thabart/SimpleOrm

공개 메소드들

메소드 설명
CalculateQualifiedName ( global::Microsoft.VisualStudio.Modeling directory, global::Microsoft.VisualStudio.Modeling element ) : string

This method calculates a moniker to a given EntityHasReferences instance.

EntityHasReferencesSerializer ( )

EntityHasReferencesSerializer Constructor

GetMonikerQualifier ( global::Microsoft.VisualStudio.Modeling directory, global::Microsoft.VisualStudio.Modeling element ) : string

A domain class can be monikerized in different ways: standard /qualifier/key mechanism, custom moniker, or element ID. If the domain class is serialized using standard /qualifier/key mechanism, this method returns the qualifier of the moniker; if the domain class uses other ways for monikerization, this method returns empty string.

Read ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void

Public Read() method that deserializes one EntityHasReferences instance from XML.

When this method is called, caller guarantees that the passed-in XML reader is positioned at the open XML tag of the EntityHasReferences element that is about to be deserialized. The method needs to ensure that when it returns, the reader is positioned at the open XML tag of the next sibling element, or the close tag of the parent element (or EOF).

Reset ( ) : void

Reset the serializer

Clear the cached information about any derived classes so that it is recalculated.

TryCreateDerivedInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ElementLink

This method creates a correct derived instance of EntityHasReferences based on the tag currently pointed by the reader. Note that the difference between this method and the above one is that this method will never create an instance of the EntityHasReferences type itself, only derived types are checked.

The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.

TryCreateInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ModelElement

This method creates a correct instance of EntityHasReferences based on the tag currently pointed by the reader. If the reader is positioned at a serialized EntityHasReferences, a new EntityHasReferences instance will be created in the given partition, otherwise null is returned.

The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.

TryCreateMonikerInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global relDomainClassId, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::Moniker

This method creates a Moniker of the correct derived (including EntityHasReferences itself) instance of EntityHasReferences based on the tag currently pointed by the reader.

The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.

Write ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer, global::Microsoft.VisualStudio.Modeling rootElementSettings ) : void

Public Write() method that serializes one EntityHasReferences instance into XML.

WriteMoniker ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global::Microsoft.VisualStudio.Modeling relSerializer ) : void

Public WriteMoniker() method that writes a monikerized EntityHasReferences instance into XML.

보호된 메소드들

메소드 설명
CreateInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ModelElement

This method creates an instance of EntityHasReferences based on the tag currently pointed by the reader. The reader is guaranteed (by the caller) to be pointed at a serialized instance of EntityHasReferences.

The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance being read. This method should not move the reader; the reader should remain at the same position when this method returns.

CreateMonikerInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global relDomainClassId, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::Moniker

This method creates a Moniker of EntityHasReferences based on the tag currently pointed by the reader.

The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.

ReadElements ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void

This methods deserializes nested XML elements inside the passed-in element.

The caller will guarantee that the current element does have nested XML elements, and the call will position the reader at the open tag of the first child XML element. This method will read as many child XML elements as it can. It returns under three circumstances: 1) When an unknown child XML element is encountered. In this case, this method will position the reader at the open tag of the unknown element. This implies that if the first child XML element is unknown, this method should return immediately and do nothing. 2) When all child XML elemnets are read. In this case, the reader will be positioned at the end tag of the parent element. 3) EOF.

ReadTargetRolePlayer ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void

This method reads the target role player Reference.

The caller will guarantee that the reader is positioned at the open tag of the first child XML element. This method will read only one target role player instance. The method will skip any child XML element it encounters until it reaches: 1) The open tag of the target role player. 2) The end tag of the parent element (dangling relationship). 3) EOF (dangling relationship). After the call, the reader is positioned at: 1) The open tag of the next child element after the target role player. 2) The end tag of the parent element. 3) EOF.

WriteElements ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer ) : void

This methods serializes 1) properties serialized as nested XML elements and 2) child model elements into XML.

비공개 메소드들

메소드 설명
ConstructDerivedClassMonikersLookupTable ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling domainDataDirectory ) : void

Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from EntityHasReferences.

ConstructDerivedClassesLookupTable ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling domainDataDirectory ) : void

Construct the apping from XmlTagName to DomainClassInfo that derives from EntityHasReferences.

InternalTryCreateInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition, bool derivedTypesOnly ) : DslModeling::ModelElement

Internal helper method for TryCreateInstance() and TryCreateDerivedInstance().

ReadPropertiesFromAttributes ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void
WritePropertiesAsAttributes ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer ) : void

메소드 상세

CalculateQualifiedName() 공개 메소드

This method calculates a moniker to a given EntityHasReferences instance.
public CalculateQualifiedName ( global::Microsoft.VisualStudio.Modeling directory, global::Microsoft.VisualStudio.Modeling element ) : string
directory global::Microsoft.VisualStudio.Modeling Directory to look up serializer based on model element type.
element global::Microsoft.VisualStudio.Modeling EntityHasReferences instance to calculate qualified name for.
리턴 string

CreateInstance() 보호된 메소드

This method creates an instance of EntityHasReferences based on the tag currently pointed by the reader. The reader is guaranteed (by the caller) to be pointed at a serialized instance of EntityHasReferences.
The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance being read. This method should not move the reader; the reader should remain at the same position when this method returns.
protected CreateInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ModelElement
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
reader global XmlReader to read serialized data from.
partition global::Microsoft.VisualStudio.Modeling Partition in which new EntityHasReferences instance should be created.
리턴 DslModeling::ModelElement

CreateMonikerInstance() 보호된 메소드

This method creates a Moniker of EntityHasReferences based on the tag currently pointed by the reader.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.
protected CreateMonikerInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global relDomainClassId, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::Moniker
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
reader global XmlReader to read serialized data from.
sourceRolePlayer global::Microsoft.VisualStudio.Modeling The source role-player instance from which the moniker being created is referenced.
relDomainClassId global The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.
partition global::Microsoft.VisualStudio.Modeling The new Moniker should be created in the Store associated with this partition.
리턴 DslModeling::Moniker

EntityHasReferencesSerializer() 공개 메소드

EntityHasReferencesSerializer Constructor

GetMonikerQualifier() 공개 메소드

A domain class can be monikerized in different ways: standard /qualifier/key mechanism, custom moniker, or element ID. If the domain class is serialized using standard /qualifier/key mechanism, this method returns the qualifier of the moniker; if the domain class uses other ways for monikerization, this method returns empty string.
public GetMonikerQualifier ( global::Microsoft.VisualStudio.Modeling directory, global::Microsoft.VisualStudio.Modeling element ) : string
directory global::Microsoft.VisualStudio.Modeling Directory to look up serializer based on model element type.
element global::Microsoft.VisualStudio.Modeling EntityHasReferences instance to get moniker qualifier from.
리턴 string

Read() 공개 메소드

Public Read() method that deserializes one EntityHasReferences instance from XML.
When this method is called, caller guarantees that the passed-in XML reader is positioned at the open XML tag of the EntityHasReferences element that is about to be deserialized. The method needs to ensure that when it returns, the reader is positioned at the open XML tag of the next sibling element, or the close tag of the parent element (or EOF).
public Read ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling In-memory EntityHasReferences instance that will get the deserialized data.
reader global XmlReader to read serialized data from.
리턴 void

ReadElements() 보호된 메소드

This methods deserializes nested XML elements inside the passed-in element.
The caller will guarantee that the current element does have nested XML elements, and the call will position the reader at the open tag of the first child XML element. This method will read as many child XML elements as it can. It returns under three circumstances: 1) When an unknown child XML element is encountered. In this case, this method will position the reader at the open tag of the unknown element. This implies that if the first child XML element is unknown, this method should return immediately and do nothing. 2) When all child XML elemnets are read. In this case, the reader will be positioned at the end tag of the parent element. 3) EOF.
protected ReadElements ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling In-memory EntityHasReferences instance that will get the deserialized data.
reader global XmlReader to read serialized data from.
리턴 void

ReadTargetRolePlayer() 보호된 메소드

This method reads the target role player Reference.
The caller will guarantee that the reader is positioned at the open tag of the first child XML element. This method will read only one target role player instance. The method will skip any child XML element it encounters until it reaches: 1) The open tag of the target role player. 2) The end tag of the parent element (dangling relationship). 3) EOF (dangling relationship). After the call, the reader is positioned at: 1) The open tag of the next child element after the target role player. 2) The end tag of the parent element. 3) EOF.
protected ReadTargetRolePlayer ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global reader ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling In-memory EntityHasReferences instance that will link to the target Reference instance.
reader global XmlReader to read serialized data from.
리턴 void

Reset() 공개 메소드

Reset the serializer
Clear the cached information about any derived classes so that it is recalculated.
public Reset ( ) : void
리턴 void

TryCreateDerivedInstance() 공개 메소드

This method creates a correct derived instance of EntityHasReferences based on the tag currently pointed by the reader. Note that the difference between this method and the above one is that this method will never create an instance of the EntityHasReferences type itself, only derived types are checked.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.
public TryCreateDerivedInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ElementLink
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
reader global XmlReader to read serialized data from.
partition global::Microsoft.VisualStudio.Modeling Partition in which new elements should be created.
리턴 DslModeling::ElementLink

TryCreateInstance() 공개 메소드

This method creates a correct instance of EntityHasReferences based on the tag currently pointed by the reader. If the reader is positioned at a serialized EntityHasReferences, a new EntityHasReferences instance will be created in the given partition, otherwise null is returned.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.
public TryCreateInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::ModelElement
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
reader global XmlReader to read serialized data from.
partition global::Microsoft.VisualStudio.Modeling Partition in which new elements should be created.
리턴 DslModeling::ModelElement

TryCreateMonikerInstance() 공개 메소드

This method creates a Moniker of the correct derived (including EntityHasReferences itself) instance of EntityHasReferences based on the tag currently pointed by the reader.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.
public TryCreateMonikerInstance ( global::Microsoft.VisualStudio.Modeling serializationContext, global reader, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global relDomainClassId, global::Microsoft.VisualStudio.Modeling partition ) : DslModeling::Moniker
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
reader global XmlReader to read serialized data from.
sourceRolePlayer global::Microsoft.VisualStudio.Modeling The source role-player instance from which the moniker being created is referenced.
relDomainClassId global The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.
partition global::Microsoft.VisualStudio.Modeling The new Moniker should be created in the Store associated with this partition.
리턴 DslModeling::Moniker

Write() 공개 메소드

Public Write() method that serializes one EntityHasReferences instance into XML.
public Write ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer, global::Microsoft.VisualStudio.Modeling rootElementSettings ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling EntityHasReferences instance to be serialized.
writer global XmlWriter to write serialized data to.
rootElementSettings global::Microsoft.VisualStudio.Modeling /// The root element settings if the passed in element is serialized as a root element in the XML. The root element contains additional /// information like schema target namespace, version, etc. /// This should only be passed for root-level elements. Null should be passed for rest elements (and ideally call the Write() method /// without this parameter). ///
리턴 void

WriteElements() 보호된 메소드

This methods serializes 1) properties serialized as nested XML elements and 2) child model elements into XML.
protected WriteElements ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling EntityHasReferences instance to be serialized.
writer global XmlWriter to write serialized data to.
리턴 void

WriteMoniker() 공개 메소드

Public WriteMoniker() method that writes a monikerized EntityHasReferences instance into XML.
public WriteMoniker ( global::Microsoft.VisualStudio.Modeling serializationContext, global::Microsoft.VisualStudio.Modeling element, global writer, global::Microsoft.VisualStudio.Modeling sourceRolePlayer, global::Microsoft.VisualStudio.Modeling relSerializer ) : void
serializationContext global::Microsoft.VisualStudio.Modeling Serialization context.
element global::Microsoft.VisualStudio.Modeling EntityHasReferences instance to be monikerized.
writer global XmlWriter to write serialized data to.
sourceRolePlayer global::Microsoft.VisualStudio.Modeling Source element that references the EntityHasReferences instance being monikerized.
relSerializer global::Microsoft.VisualStudio.Modeling Serializer that handles the relationship connecting the source element to the EntityHasReferences instance being monikerized.
리턴 void