Share via


BinaryLinkShapeSerializer Class

Definition

Customized part of BinaryLinkShapeSerializer. We want to special-case BinaryLinkShape which connects to relationship MELs so that the relationship doesn't have to be marked with SerializeID and UseFullForm, as long as the relationship doesn't allow multiple instances between the same two ends.

public ref class BinaryLinkShapeSerializer : Microsoft::VisualStudio::Modeling::Diagrams::BinaryLinkShapeSerializerBase
public class BinaryLinkShapeSerializer : Microsoft.VisualStudio.Modeling.Diagrams.BinaryLinkShapeSerializerBase
type BinaryLinkShapeSerializer = class
    inherit BinaryLinkShapeSerializerBase
Public Class BinaryLinkShapeSerializer
Inherits BinaryLinkShapeSerializerBase
Inheritance
Derived

Constructors

BinaryLinkShapeSerializer()

BinaryLinkShapeSerializer Constructor

Properties

MonikerAttributeName

Cannot be monikerized.

(Inherited from BinaryLinkShapeSerializerBase)
MonikerTagName

Cannot be monikerized.

(Inherited from BinaryLinkShapeSerializerBase)
XmlTagName

Cannot be serialized.

(Inherited from BinaryLinkShapeSerializerBase)

Methods

CalculateQualifiedName(DomainXmlSerializerDirectory, ModelElement)

This method calculates a moniker to a given BinaryLinkShape instance.

(Inherited from BinaryLinkShapeSerializerBase)
CreateInstance(SerializationContext, XmlReader, Partition)

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

(Inherited from BinaryLinkShapeSerializerBase)
CreateMonikerInstance(SerializationContext, XmlReader, ModelElement, Guid, Partition)

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

(Inherited from BinaryLinkShapeSerializerBase)
GetMonikerQualifier(DomainXmlSerializerDirectory, ModelElement)

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.

(Inherited from BinaryLinkShapeSerializerBase)
Read(SerializationContext, ModelElement, XmlReader)

BinaryLinkShape is abstract and cannot be instantiated, so this method throws NotSupportedException.

(Inherited from BinaryLinkShapeSerializerBase)
ReadAdditionalElementData(SerializationContext, ModelElement, XmlReader)

Read any additional element data associated with the element

(Inherited from DomainClassXmlSerializer)
ReadElements(SerializationContext, ModelElement, XmlReader)

Reads in child elements. We customize it here to skip the target ElementLink instance if it's not AllowDuplicates=true.

ReadLinkShapeChildElements(SerializationContext, LinkShape, XmlReader)

Read child elements defined on LinkShape.

(Inherited from LinkShapeSerializer)
ReadPropertiesFromAttributes(SerializationContext, ModelElement, XmlReader)

Reads in attributes on the BinaryLinkShape. We customize it here to reads in the type of the target ElementLink if it was written out.

ReadRootElement(SerializationContext, ModelElement, XmlReader, ISchemaResolver)

Public ReadRootElement() method that deserializes a root-level element from XML. The difference between root-level element and the rest elements in the XML is that the root may carry additional information like schema, version, etc. The default implementation just calls Read() method, it's up to the derived implementations to do any additional checks.

(Inherited from DomainClassXmlSerializer)
ReadShapeElementChildElements(SerializationContext, ShapeElement, XmlReader)

Read child elements defined on ShapeElement.

(Inherited from ShapeElementSerializer)
Reset()

Reset the serializer

(Inherited from BinaryLinkShapeSerializerBase)
TryCreateInstance(SerializationContext, XmlReader, Partition)

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

(Inherited from BinaryLinkShapeSerializerBase)
TryCreateMonikerInstance(SerializationContext, XmlReader, ModelElement, Guid, Partition)

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

(Inherited from BinaryLinkShapeSerializerBase)
UseRelationshipId(ElementLink, SerializationContext)

Calculate whether the BinaryLinkShape should serialize its relationship to the presented link using an Id or its source and target shapes.

Write(SerializationContext, ModelElement, XmlWriter, RootElementSettings)

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

(Inherited from BinaryLinkShapeSerializerBase)
Write(SerializationContext, ModelElement, XmlWriter)

Public Write() method that serializes the ModelElement instance associated with this serializer instance into XML. This method just calls Write() with no RootElementSettings.

(Inherited from DomainClassXmlSerializer)
WriteAdditionalElementData(SerializationContext, ModelElement, XmlWriter)

Write any additional element data associated with the element

(Inherited from DomainClassXmlSerializer)
WriteElements(SerializationContext, ModelElement, XmlWriter)

Writes out child elements. We customize it here to skip the target ElementLink instance if it's not AllowDuplicates=true.

WriteLinkShapeChildElements(SerializationContext, LinkShape, XmlWriter)

Write child elements defined on LinkShape.

(Inherited from LinkShapeSerializer)
WriteMoniker(SerializationContext, ModelElement, XmlWriter, ModelElement, DomainRelationshipXmlSerializer)

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

(Inherited from BinaryLinkShapeSerializerBase)
WritePropertiesAsAttributes(SerializationContext, ModelElement, XmlWriter)

Writes out attributes on this BinaryLinkShape. We customize it here to write out the type of the target ElementLink if it will be skipped by WriteElements() method.

WriteRootElement(SerializationContext, ModelElement, XmlWriter)

Public WriteRootElement() method that serializes a root-level element to XML. The difference between root-level element and the rest elements in the XML is that the root may carry additional information like schema, version, etc. The default implementation just calls Write() method with no RootElementSettings, it's up to the derived implementations to do any additional checks.

(Inherited from DomainClassXmlSerializer)
WriteShapeElementChildElements(SerializationContext, ShapeElement, XmlWriter)

Write child elements defined on ShapeElement.

(Inherited from ShapeElementSerializer)

Applies to