IVsTrackProjectDocuments2.OnAfterRenameFiles 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在项目中重命名文件后,项目将调用此方法。
public:
int OnAfterRenameFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, cli::array <System::String ^> ^ rgszMkOldNames, cli::array <System::String ^> ^ rgszMkNewNames, cli::array <Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS> ^ rgFlags);
public:
int OnAfterRenameFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, Platform::Array <Platform::String ^> ^ rgszMkOldNames, Platform::Array <Platform::String ^> ^ rgszMkNewNames, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS> ^ rgFlags);
int OnAfterRenameFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, int cFiles, std::Array <std::wstring const &> const & rgszMkOldNames, std::Array <std::wstring const &> const & rgszMkNewNames, std::Array <Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS> const & rgFlags);
public int OnAfterRenameFiles (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, int cFiles, string[] rgszMkOldNames, string[] rgszMkNewNames, Microsoft.VisualStudio.Shell.Interop.VSRENAMEFILEFLAGS[] rgFlags);
abstract member OnAfterRenameFiles : Microsoft.VisualStudio.Shell.Interop.IVsProject * int * string[] * string[] * Microsoft.VisualStudio.Shell.Interop.VSRENAMEFILEFLAGS[] -> int
Public Function OnAfterRenameFiles (pProject As IVsProject, cFiles As Integer, rgszMkOldNames As String(), rgszMkNewNames As String(), rgFlags As VSRENAMEFILEFLAGS()) As Integer
参数
- pProject
- IVsProject
中包含已重命名的文件的项目。
- cFiles
- Int32
中已重命名的文件数。
- rgszMkOldNames
- String[]
中旧文件名称的路径数组。
- rgszMkNewNames
- String[]
中新文件的名称的路径数组。
- rgFlags
- VSRENAMEFILEFLAGS[]
中有关值的列表 rgflags ,请参阅 VSRENAMEFILEFLAGS 。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 IVsTrackProjectDocuments2
HRESULT IVsTrackProjectDocuments2::OnAfterRenameFiles(
[in] IVsProject *pProject,
[in] int cFiles,
[in, size_is(cFiles)] const LPCOLESTR rgszMkOldNames[],
[in, size_is(cFiles)] const LPCOLESTR rgszMkNewNames[],
[in, size_is(cFiles)] const VSRENAMEFILEFLAGS rgflags[]
);
项目在重命名文件后调用此方法,以通知环境文件已重命名。