本文整理匯總了C#中Microsoft.VisualStudioTools.Project.ProjectElement.GetFullPathForElement方法的典型用法代碼示例。如果您正苦於以下問題:C# ProjectElement.GetFullPathForElement方法的具體用法?C# ProjectElement.GetFullPathForElement怎麽用?C# ProjectElement.GetFullPathForElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.VisualStudioTools.Project.ProjectElement
的用法示例。
在下文中一共展示了ProjectElement.GetFullPathForElement方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CreateFileNode
/// <summary>
/// Create a file node based on an msbuild item.
/// </summary>
/// <param name="item">The msbuild item to be analyzed</param>
public override FileNode CreateFileNode(ProjectElement item) {
Utilities.ArgumentNotNull("item", item);
CommonFileNode newNode;
if (IsCodeFile(item.GetFullPathForElement())) {
newNode = CreateCodeFileNode(item);
} else {
newNode = CreateNonCodeFileNode(item);
}
string link = item.GetMetadata(ProjectFileConstants.Link);
if (!String.IsNullOrWhiteSpace(link) ||
!CommonUtils.IsSubpathOf(ProjectHome, item.GetFullPathForElement())) {
newNode.SetIsLinkFile(true);
}
string include = item.GetMetadata(ProjectFileConstants.Include);
newNode.OleServiceProvider.AddService(typeof(EnvDTE.Project),
new OleServiceProvider.ServiceCreatorCallback(CreateServices), false);
newNode.OleServiceProvider.AddService(typeof(EnvDTE.ProjectItem), newNode.ServiceCreator, false);
if (!string.IsNullOrEmpty(include) && Path.GetExtension(include).Equals(".xaml", StringComparison.OrdinalIgnoreCase)) {
//Create a DesignerContext for the XAML designer for this file
newNode.OleServiceProvider.AddService(typeof(DesignerContext), newNode.ServiceCreator, false);
}
newNode.OleServiceProvider.AddService(typeof(VSLangProj.VSProject),
new OleServiceProvider.ServiceCreatorCallback(CreateServices), false);
return newNode;
}