コード例 #1
0
ファイル: Solution.cs プロジェクト: kjnilsson/ripple
        public ValidationResult Validate()
        {
            var localDependencies = LocalDependencies();
            var result = new ValidationResult(this);

            Dependencies.Each(dependency =>
            {
                if (!localDependencies.Has(dependency))
                {
                    result.AddProblem(dependency.Name, "Not found");
                    return;
                }

                var local = localDependencies.Get(dependency);
                if (dependency.Version.IsNotEmpty() && local.Version < dependency.SemanticVersion())
                {
                    result.AddProblem(dependency.Name, "Solution requires {0} but the local copy is {1}".ToFormat(dependency.Version, local.Version.ToString()));
                }
            });

            return result;
        }
コード例 #2
0
 public void Validate(Solution solution, ValidationResult result)
 {
     result.AddProblem("Stub", "The problem");
 }