本文整理汇总了C#中ITreeNode.As方法的典型用法代码示例。如果您正苦于以下问题:C# ITreeNode.As方法的具体用法?C# ITreeNode.As怎么用?C# ITreeNode.As使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITreeNode
的用法示例。
在下文中一共展示了ITreeNode.As方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WhenSolutionIsOpened_ThenCanGetMsBuildProjectProperties
public void WhenSolutionIsOpened_ThenCanGetMsBuildProjectProperties()
{
base.OpenSolution("SampleSolution\\SampleSolution.sln");
var explorer = base.ServiceLocator.GetInstance<ISolutionExplorer>();
var lib = new ITreeNode[] { explorer.Solution }.Traverse(TraverseKind.BreadthFirst, node => node.Nodes)
.OfType<IProjectNode>()
.FirstOrDefault(node => node.DisplayName == "ClassLibrary");
var msb = lib.As<MsBuild.Project>();
Assert.NotNull(msb);
//Console.WriteLine("IntermediateOutputPath : {0}", lib.Properties.IntermediateOutputPath);
//Console.WriteLine("DesignTimeIntermediateOutputPath : {0}", lib.Properties.DesignTimeIntermediateOutputPath);
//Console.WriteLine("BaseIntermediateOutputPath : {0}", lib.Properties.BaseIntermediateOutputPath);
//Console.WriteLine("MSBuildProjectDirectory : {0}", lib.Properties.MSBuildProjectDirectory);
//Console.WriteLine("OutputFileName: {0}", lib.Properties.OutputFileName);
//Console.WriteLine("OutputPath: {0}", lib.Properties.OutputPath);
//Console.WriteLine("TargetDir : {0}", lib.Properties.TargetDir);
//Console.WriteLine("TargetedFrameworkDir : {0}", lib.Properties.TargetedFrameworkDir);
//Console.WriteLine("TargetedRuntimeVersion : {0}", lib.Properties.TargetedRuntimeVersion);
//Console.WriteLine("TargetedSDKArchitecture : {0}", lib.Properties.TargetedSDKArchitecture);
//Console.WriteLine("TargetedSDKConfiguration : {0}", lib.Properties.TargetedSDKConfiguration);
//Console.WriteLine("TargetExt : {0}", lib.Properties.TargetExt);
//Console.WriteLine("TargetFileName : {0}", lib.Properties.TargetFileName);
//Console.WriteLine("TargetFramework : {0}", lib.Properties.TargetFramework);
//Console.WriteLine("TargetFrameworkAsMSBuildRuntime : {0}", lib.Properties.TargetFrameworkAsMSBuildRuntime);
//Console.WriteLine("TargetFrameworkIdentifier : {0}", lib.Properties.TargetFrameworkIdentifier);
//Console.WriteLine("TargetFrameworkMoniker : {0}", lib.Properties.TargetFrameworkMoniker);
//Console.WriteLine("TargetFrameworkMonikerAssemblyAttributesPath : {0}", lib.Properties.TargetFrameworkMonikerAssemblyAttributesPath);
//Console.WriteLine("TargetFrameworkMonikerDisplayName : {0}", lib.Properties.TargetFrameworkMonikerDisplayName);
//Console.WriteLine("TargetFrameworkSDKToolsDirectory : {0}", lib.Properties.TargetFrameworkSDKToolsDirectory);
//Console.WriteLine("TargetFrameworkVersion : {0}", lib.Properties.TargetFrameworkVersion);
//Console.WriteLine("TargetName : {0}", lib.Properties.TargetName);
//Console.WriteLine("TargetPath : {0}", lib.Properties.TargetPath);
//Console.WriteLine("TargetPlatformIdentifier : {0}", lib.Properties.TargetPlatformIdentifier);
//Console.WriteLine("TargetPlatformMoniker : {0}", lib.Properties.TargetPlatformMoniker);
//Console.WriteLine("TargetPlatformRegistryBase : {0}", lib.Properties.TargetPlatformRegistryBase);
//Console.WriteLine("TargetPlatformSdkPath : {0}", lib.Properties.TargetPlatformSdkPath);
//Console.WriteLine("TargetPlatformVersion : {0}", lib.Properties.TargetPlatformVersion);
//Console.WriteLine("TargetRuntime : {0}", lib.Properties.TargetRuntime);
//((DynamicObject)lib.Properties).GetDynamicMemberNames()
// .ToList()
// .ForEach(prop => Console.WriteLine(prop));
}