共用方式為


DslDefinitionModelSerializationHelper Class

Definition

Helper class for serializing and deserializing DslDefinitionModel models.

public ref class DslDefinitionModelSerializationHelper sealed : Microsoft::VisualStudio::Modeling::DslDefinition::DslDefinitionModelSerializationHelperBase
public sealed class DslDefinitionModelSerializationHelper : Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelSerializationHelperBase
type DslDefinitionModelSerializationHelper = class
    inherit DslDefinitionModelSerializationHelperBase
Public NotInheritable Class DslDefinitionModelSerializationHelper
Inherits DslDefinitionModelSerializationHelperBase
Inheritance
DslDefinitionModelSerializationHelper

Remarks

This is very similar to the standard (generated) version check, but differs in checking the major and minor version numbers independently and treating mismatches differently

Properties

Instance

Singleton instance.

Methods

CheckForOrphanedShapes(Diagram, SerializationResult)

Go through the diagram to find all shapes that are not connected to a model element. Some of them may be by design, the rest are out-of-sync shapes. We want to make sure that all out-of-sync shapes are given a chance to fix themselves up, or post proper warning/error messages.

(Inherited from DslDefinitionModelSerializationHelperBase)
CheckVersion(SerializationContext, XmlReader)

Checks the version of the file being read.

(Inherited from DslDefinitionModelSerializationHelperBase)
CreateModelHelper(Partition)

Helper method to create and initialize a new DslLibrary.

(Inherited from DslDefinitionModelSerializationHelperBase)
GetDirectory(Store)

Return the directory of serializers to use

(Inherited from DslDefinitionModelSerializationHelperBase)
GetMonikerResolvers(Store)

This method returns the moniker resolvers for each of the domain models in the store

(Inherited from DslDefinitionModelSerializationHelperBase)
GetSerializedModelString(DslLibrary, Encoding)

Return the model in XML format

(Inherited from DslDefinitionModelSerializationHelperBase)
InitializeSerialization(Store)

Ensure that moniker resolvers and domain element serializers are installed properly on the given store, so that deserialization can be carried out correctly.

(Inherited from DslDefinitionModelSerializationHelperBase)
InitializeSerializationContext(Partition, SerializationContext, Boolean) (Inherited from DslDefinitionModelSerializationHelperBase)
LoadModel(SerializationResult, Partition, String, ISchemaResolver, ValidationController, ISerializerLocator, Stream) (Inherited from DslDefinitionModelSerializationHelperBase)
LoadModel(SerializationResult, Partition, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance.

LoadModel(SerializationResult, Store, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance into the default partition of the given store.

(Inherited from DslDefinitionModelSerializationHelperBase)
LoadModel(Store, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance into the default partition of the given store, and ignore serialization result.

(Inherited from DslDefinitionModelSerializationHelperBase)
LoadModelAndDiagram(SerializationResult, Partition, String, Partition, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance and its associated diagram file.

(Inherited from DslDefinitionModelSerializationHelperBase)
LoadModelAndDiagram(SerializationResult, Store, String, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance and its associated diagram file into the default partition of the given store.

(Inherited from DslDefinitionModelSerializationHelperBase)
LoadModelAndDiagram(Store, String, String, ISchemaResolver, ValidationController, ISerializerLocator)

Loads a DslLibrary instance and its associated diagram file into the default partition of the given store, and ignore serialization result.

(Inherited from DslDefinitionModelSerializationHelperBase)
OnPostLoadModel(SerializationResult, Partition, String, DslLibrary)

Customize Model Loading.

(Inherited from DslDefinitionModelSerializationHelperBase)
ReadExtensions(SerializationContext, ModelElement, XmlReader)

Read any extension data written inside this XML element

(Inherited from DslDefinitionModelSerializationHelperBase)
ReadRootElement(SerializationContext, ModelElement, XmlReader, ISchemaResolver)

Read an element from the root of XML.

(Inherited from DslDefinitionModelSerializationHelperBase)
SaveModel(SerializationResult, DslLibrary, String, Boolean)

Saves the given model to the given file, with default encoding (UTF-8).

(Inherited from DslDefinitionModelSerializationHelperBase)
SaveModel(SerializationResult, DslLibrary, String, Encoding, Boolean)

Saves the given model root to the given file, with specified encoding.

(Inherited from DslDefinitionModelSerializationHelperBase)
SaveModel(SerializationResult, DslLibrary, String)

Saves the given model root to the given file, with default encoding (UTF-8), and optional properties with default value will not be written out.

(Inherited from DslDefinitionModelSerializationHelperBase)
TryCreateValidatingReader(ISchemaResolver, XmlReader, SerializationContext)

Attempts to return a validating XML reader

(Inherited from DslDefinitionModelSerializationHelperBase)
TryGetEncoding(XmlReader, Encoding)

Attempts to return the encoding used by the reader.

(Inherited from DslDefinitionModelSerializationHelperBase)
WriteExtensions(SerializationContext, ModelElement, XmlWriter)

Write extension element data inside the current XML element

(Inherited from DslDefinitionModelSerializationHelperBase)
WriteRootElement(SerializationContext, ModelElement, XmlWriter)

Write an element as the root of XML.

(Inherited from DslDefinitionModelSerializationHelperBase)

Applies to