public static bool TryGetPublicationFiles(int publicationID, out Dictionary <string, UpdateItem> filesInPublication, out List <FileCollision> fileCollisions)
        {
            filesInPublication = new Dictionary <string, UpdateItem>();
            fileCollisions     = new List <FileCollision>();

            foreach (FileInfo packageInfo in AutoUpdateManager.GetPackages())
            {
                if (AutoUpdateManager.IsPackageExcludedFromPublication(publicationID, packageInfo.Name) == false)
                {
                    foreach (UpdateItem fileInfo in AutoUpdateManager.GetFilesInUpdatePackage(packageInfo.Name))
                    {
                        if (fileInfo.IsIncluded == false)
                        {
                            continue;
                        }

                        string relativeFilePath = Path.Combine(fileInfo.RelativeDirectory, fileInfo.Name);

                        if (filesInPublication.ContainsKey(relativeFilePath) == true)
                        {
                            FileCollision fileCollision = new FileCollision();
                            fileCollision.CollidingFile = Path.Combine(packageInfo.Name, relativeFilePath);
                            fileCollision.PreferredFile = Path.Combine(filesInPublication[relativeFilePath].PackageName, relativeFilePath);

                            fileCollisions.Add(fileCollision);

                            continue;
                        }
                        else
                        {
                            filesInPublication.Add(relativeFilePath, fileInfo);
                        }
                    }
                }
            }

            return(true);
        }
        public static bool TryGetPublicationFiles(int publicationID, out Dictionary<string, UpdateItem> filesInPublication, out List<FileCollision> fileCollisions)
        {
            filesInPublication = new Dictionary<string, UpdateItem>();
            fileCollisions = new List<FileCollision>();

            foreach (FileInfo packageInfo in AutoUpdateManager.GetPackages())
            {
                if (AutoUpdateManager.IsPackageExcludedFromPublication(publicationID, packageInfo.Name) == false)
                {
                    foreach (UpdateItem fileInfo in AutoUpdateManager.GetFilesInUpdatePackage(packageInfo.Name))
                    {
                        if (fileInfo.IsIncluded == false)
                            continue;

                        string relativeFilePath = Path.Combine(fileInfo.RelativeDirectory, fileInfo.Name);

                        if (filesInPublication.ContainsKey(relativeFilePath) == true)
                        {
                            FileCollision fileCollision = new FileCollision();
                            fileCollision.CollidingFile = Path.Combine(packageInfo.Name, relativeFilePath);
                            fileCollision.PreferredFile = Path.Combine(filesInPublication[relativeFilePath].PackageName, relativeFilePath);

                            fileCollisions.Add(fileCollision);

                            continue;
                        }
                        else
                        {
                            filesInPublication.Add(relativeFilePath, fileInfo);
                        }
                    }
                }
            }

            return true;
        }