コード例 #1
0
 // ���������� ���������� ������ ������� � �������� ������ ������ ������
 private static void HandleVersionNotFoundException(VersionNotFoundException versionNotFoundException)
 {
     ShowExceptionDialog(versionNotFoundException, NotAllowedExceptionMessage, "����������� ������", MessageBoxIcon.Information, true);
 }
コード例 #2
0
        /// <summary>
        /// Try to retrieve dependancies from cache if it was already compute, if not try to resolve it
        /// </summary>
        internal Tuple<SemanticVersion, string> RetrieveConflictingDependancyFromCacheOrResolve(SortedDictionary<Tuple<SemanticVersion, string>, DllReference> assemblies,
                                                                                                DllReference parentAssembly, SortedSet<SemanticVersion> assembliesSemanticVersions,
                                                                                                AssemblyReference assemblyDependency)
        {
            var asmss = assembliesSemanticVersions
                .Select(_ =>
                {
                    try
                    {
                        return assemblies[new Tuple<SemanticVersion, string>(_, assemblyDependency.Item2)];
                    }
                    catch (KeyNotFoundException exc)
                    {
                        var excption = new VersionNotFoundException(String.Format("versions.ini is not consistent with assemblies.ini. versions.ini is referencing {1}-{0} while it doesn't exist in Assemblies.ini", _, assemblyDependency.Item2), exc);
                        throw excption;
                    }
                })
                //If Parent assembly is a snapshot we include snapshot in dependency otherwise no because nuget doesn't support
                // official package with snapshot dependency
                .Where(_ =>
                    (string.IsNullOrEmpty(parentAssembly.Id.Item1.SpecialVersion) &&
                        !string.IsNullOrEmpty(_.Id.Item1.SpecialVersion))
                        ? false
                        : true
                );

            var result = ResolveConflictingDependancy(asmss, parentAssembly);
            return result;
        }