VsShellUtilities.SaveFileIfDirty Method (IServiceProvider, String)
Saves the specified file if it is dirty.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣告
Public Shared Sub SaveFileIfDirty ( _
site As IServiceProvider, _
fullPath As String _
)
'用途
Dim site As IServiceProvider
Dim fullPath As String
VsShellUtilities.SaveFileIfDirty(site, fullPath)
public static void SaveFileIfDirty(
IServiceProvider site,
string fullPath
)
public:
static void SaveFileIfDirty(
IServiceProvider^ site,
String^ fullPath
)
static member SaveFileIfDirty :
site:IServiceProvider *
fullPath:string -> unit
public static function SaveFileIfDirty(
site : IServiceProvider,
fullPath : String
)
Parameters
- site
Type: System.IServiceProvider
IServiceProvider.
- fullPath
Type: System.String
The absolute path of the file.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.