Freigeben über


ISerializerLocatorExtensions.GetSerializer Method

Returns a serializer that handles the specified type of domain model, or null if an appropriate serializer could not be found.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetSerializer ( _
    locator As ISerializerLocator, _
    domainModelType As Type _
) As IDomainModelSerializer
public static IDomainModelSerializer GetSerializer(
    this ISerializerLocator locator,
    Type domainModelType
)
[ExtensionAttribute]
public:
static IDomainModelSerializer^ GetSerializer(
    ISerializerLocator^ locator, 
    Type^ domainModelType
)
static member GetSerializer : 
        locator:ISerializerLocator * 
        domainModelType:Type -> IDomainModelSerializer
public static function GetSerializer(
    locator : ISerializerLocator, 
    domainModelType : Type
) : IDomainModelSerializer

Parameters

  • domainModelType
    Type: System.Type

    Type of the domain model to be serialized.

Return Value

Type: Microsoft.VisualStudio.Modeling.IDomainModelSerializer
A serializer that can serialize the type of model or null if one could not be located

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ISerializerLocator. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

ISerializerLocatorExtensions Class

Microsoft.VisualStudio.Modeling Namespace