コード例 #1
0
ファイル: PackageManager.cs プロジェクト: jonnybest/coapp
        internal void GenerateAtomFeed(string outputFilename, string packageSource, bool recursive,  string rootUrl, string packageUrl, string actualUrl = null, string title = null)
        {
            outputFilename = Path.GetFullPath(outputFilename);
            PackageFeed.GetPackageFeedFromLocation(packageSource, recursive).ContinueWith(antecedent => {
                var packageFeed = antecedent.Result;

                var generatedFeed = new AtomFeed(outputFilename, rootUrl, packageUrl, actualUrl, title);

                foreach (var pkg in packageFeed.FindPackages("*")) {
                    generatedFeed.AddPackage(pkg, packageFeed.Location.RelativePathTo(pkg.LocalPackagePath));
                }
                generatedFeed.Save(outputFilename);

            }, TaskContinuationOptions.AttachedToParent ).Wait();
        }