InfrastructureHelper.IsCodeDomDefinedExtension Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Defines a helper method that is used to call the IsDefinedExtension() method from an application that is not fully trusted.

Namespace:  Microsoft.Web.Infrastructure
Assembly:  Microsoft.Web.Infrastructure (in Microsoft.Web.Infrastructure.dll)

Syntax

'Declaration
Public Shared Function IsCodeDomDefinedExtension ( _
    extension As String _
) As Boolean
'Usage
Dim extension As String
Dim returnValue As Boolean

returnValue = InfrastructureHelper.IsCodeDomDefinedExtension(extension)
public static bool IsCodeDomDefinedExtension(
    string extension
)
public:
static bool IsCodeDomDefinedExtension(
    String^ extension
)
public static function IsCodeDomDefinedExtension(
    extension : String
) : boolean

Parameters

Return Value

Type: System.Boolean
true if a CodeDomProvider implementation is configured for the specified file name extension; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

extension is nulla null reference (Nothing in Visual Basic).

SecurityException

The caller does not have the required permission.

Remarks

The IsCodeDomDefinedExtension(String) method tests whether a file name extension has an associated CodeDomProvider implementation that is configured on the computer.

The system.codedom element in the machine configuration file (Machine.config) contains the language provider and compiler configuration settings for each CodeDomProvider implementation on the computer. The IsDefinedExtension method searches the provider configuration elements for the specified file name extension.

File name extensions are case-insensitive.

See Also

Reference

InfrastructureHelper Class

Microsoft.Web.Infrastructure Namespace