コード例 #1
0
ファイル: TaskUtility.cs プロジェクト: 464884492/msbuildtasks
 /// <summary>
 /// Returns the full path to the command that will be executed by a ToolTask
 /// </summary>
 /// <param name="task">The ToolTask</param>
 /// <returns></returns>
 public static string GetToolTaskToolPath(ToolTask task)
 {
     MethodInfo method = task.GetType().GetMethod("GenerateFullPathToTool", BindingFlags.Instance | BindingFlags.NonPublic);
     return (string) method.Invoke(task, null);
 }
コード例 #2
0
ファイル: ResGen_Tests.cs プロジェクト: JamesLinus/msbuild
 /// <summary>
 /// Gets the LogPrivate on the given ToolTask instance. We need to use reflection since
 /// LogPrivate is a private property.
 /// </summary>
 /// <returns></returns>
 static private TaskLoggingHelper GetPrivateLog(ToolTask task)
 {
     PropertyInfo logPrivateProperty = typeof(ToolTask).GetProperty("LogPrivate", BindingFlags.Instance | BindingFlags.NonPublic);
     return (TaskLoggingHelper)logPrivateProperty.GetValue(task, null);
 }
コード例 #3
0
ファイル: TaskUtility.cs プロジェクト: 464884492/msbuildtasks
 /// <summary>
 /// Returns the command line with arguments that a ToolTask will execute
 /// </summary>
 /// <param name="task">The ToolTask</param>
 /// <returns></returns>
 public static string GetToolTaskCommand(ToolTask task)
 {
     MethodInfo method = task.GetType().GetMethod("GenerateCommandLineCommands", BindingFlags.Instance | BindingFlags.NonPublic);
     return (string) method.Invoke(task, null);
 }
コード例 #4
0
 /// <summary>
 /// Invokes the ValidateParameters on the given ToolTask instance. We need to use reflection since
 /// ValidateParameters is inaccessible to Tasks unit tests.
 /// </summary>
 /// <returns></returns>
 static internal bool CallValidateParameters(ToolTask task)
 {
     MethodInfo validateMethod = typeof(ToolTask).GetMethod("ValidateParameters", BindingFlags.Instance | BindingFlags.NonPublic);
     return (bool)validateMethod.Invoke(task, null);
 }