Share via


IFileTypeManagementService.RegisterExtensionToContentType Method

Applies to v2.

Registers an extension to a content type.

Namespace:  Microsoft.WebMatrix.Extensibility.Editor
Assembly:  Microsoft.WebMatrix.Extensibility (in Microsoft.WebMatrix.Extensibility.dll)

Syntax

'Declaration
Function RegisterExtensionToContentType ( _
    filePath As String, _
    contentTypeName As String _
) As Boolean
'Usage
Dim instance As IFileTypeManagementService 
Dim filePath As String 
Dim contentTypeName As String 
Dim returnValue As Boolean 

returnValue = instance.RegisterExtensionToContentType(filePath, _
    contentTypeName)
bool RegisterExtensionToContentType(
    string filePath,
    string contentTypeName
)
bool RegisterExtensionToContentType(
    String^ filePath, 
    String^ contentTypeName
)
abstract RegisterExtensionToContentType : 
        filePath:string * 
        contentTypeName:string -> bool
function RegisterExtensionToContentType(
    filePath : String, 
    contentTypeName : String
) : boolean

Parameters

  • contentTypeName
    Type: System.String

    The name of the content type.

Return Value

Type: System.Boolean
true if registered; otherwise, false.

See Also

Reference

IFileTypeManagementService Interface

Microsoft.WebMatrix.Extensibility.Editor Namespace