Utilities.ValidateFileName Method

Validates a file path by validating all the parts of the path. If the file name is invalid, it throws an exception if the project is in automation; otherwise it shows a dialog box with the error message.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Public Shared Sub ValidateFileName ( _
    serviceProvider As IServiceProvider, _
    filePath As String _
)
'使用
Dim serviceProvider As IServiceProvider
Dim filePath As String

Utilities.ValidateFileName(serviceProvider, _
    filePath)
public static void ValidateFileName(
    IServiceProvider serviceProvider,
    string filePath
)
public:
static void ValidateFileName(
    IServiceProvider^ serviceProvider, 
    String^ filePath
)
public static function ValidateFileName(
    serviceProvider : IServiceProvider, 
    filePath : String
)

Parameters

Remarks

If the file name is invalid it throws an InvalidOperationException if the project is in automation. Otherwise it shows a dialog box with the error message.

Permissions

See Also

Reference

Utilities Class

Utilities Members

Microsoft.VisualStudio.Package Namespace