Пример #1
0
        internal protected virtual TargetEvaluationResult OnRunTarget(IProgressMonitor monitor, string target, ConfigurationSelector configuration, TargetEvaluationContext context)
        {
            var r       = base.OnRunTarget(monitor, target, configuration);
            var evalRes = CallContext.GetData("MonoDevelop.Projects.TargetEvaluationResult") as TargetEvaluationResult;

            if (evalRes != null)
            {
                evalRes.BuildResult = r;
            }
            else
            {
                evalRes = new TargetEvaluationResult(r);
            }
            return(evalRes);
        }
Пример #2
0
		internal protected virtual TargetEvaluationResult OnRunTarget (IProgressMonitor monitor, string target, ConfigurationSelector configuration, TargetEvaluationContext context)
		{
			var currentContext = CallContext.GetData ("MonoDevelop.Projects.ProjectOperationContext") as ProjectOperationContext;
			CallContext.SetData ("MonoDevelop.Projects.ProjectOperationContext", context);

			try {
				var r = base.OnRunTarget (monitor, target, configuration);
				var evalRes = CallContext.GetData ("MonoDevelop.Projects.TargetEvaluationResult") as TargetEvaluationResult;
				if (evalRes != null)
					evalRes.BuildResult = r;
				else
					evalRes = new TargetEvaluationResult (r);
				return evalRes;
			} finally {
				CallContext.SetData ("MonoDevelop.Projects.ProjectOperationContext", currentContext);
			}
		}