Freigeben über


SerializationUtilities Class

Provides utilities for serialization.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.SerializationUtilities

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Declaration
Public NotInheritable Class SerializationUtilities
public static class SerializationUtilities
public ref class SerializationUtilities abstract sealed
[<AbstractClass>]
[<Sealed>]
type SerializationUtilities =  class end
public final class SerializationUtilities

The SerializationUtilities type exposes the following members.

Methods

  Name Description
Public methodStatic member AddMessage(SerializationContext, SerializationMessageKind, XmlException, array<KeyValuePair<String, Object>[]) Adds a message to a serialization context.
Public methodStatic member AddMessage(SerializationContext, SerializationMessageKind, String, IXmlLineInfo, array<KeyValuePair<String, Object>[]) Adds a message to a serialization context.
Public methodStatic member AddMessage(SerializationContext, SerializationMessageKind, String, Int32, Int32, array<KeyValuePair<String, Object>[]) Adds a message to a serialization context.
Public methodStatic member AddMessage(SerializationResult, String, SerializationMessageKind, String, Int32, Int32, array<KeyValuePair<String, Object>[]) Helper to build a SerializationMessage and store it into the given SerializationContext.
Public methodStatic member AddValidationMessage Adds a validation message to a serialization result.
Public methodStatic member GetElementName Gets the name of an element in the serialization results.
Public methodStatic member GetNamespacesFromCurrentNode Returns a list of the XML namespaces in the current node
Public methodStatic member GetPositionInfo Gets the position of the reader in the serialization results.
Public methodStatic member GetString<T>(T) Converts an object of a given type into a string.
Public methodStatic member GetString<T>(SerializationContext, T) Converts a string into a given type.
Public methodStatic member GetValue<T>(String) Converts a string into a given type.
Public methodStatic member GetValue<T>(SerializationContext, String) Converts a string to the given type
Public methodStatic member ReadExtensions Reads extension elements from the supplied reader.
Public methodStatic member ResolveDomainModels Resolves XML namespace declarations to domain models and loads the domain models into the store.
Public methodStatic member Skip Skips the XmlReader.
Public methodStatic member SkipToFirstChild Moves the reader to the open tag of the first child element.
Public methodStatic member SkipToNextElement Moves the reader to the start tag of the next element.
Public methodStatic member TryGetValue<T>(String, T%) Tries to convert a string into a given type.
Public methodStatic member TryGetValue<T>(SerializationContext, String, T%) Try to convert a string into the given type, no exception is thrown.
Public methodStatic member TryGetValueFromBinaryForm<T> Tries to deserialize a type from the given string.
Public methodStatic member UnescapeXmlString Obsolete. Converts an escaped string to an unescaped string read from XML.
Public methodStatic member WriteDomainModelNamespaces Write out the xml namespaces for domain models in the supplied directory
Public methodStatic member WriteExtensions Write the supplied list of extension elements inside an extensions XML element.

Top

Fields

  Name Description
Public fieldStatic member ExtensionsXmlElementName The XML element name for the outer element that contains a list of ExtensionElements.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace