本文整理汇总了C#中PackageManager.AddFeed方法的典型用法代码示例。如果您正苦于以下问题:C# PackageManager.AddFeed方法的具体用法?C# PackageManager.AddFeed怎么用?C# PackageManager.AddFeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageManager
的用法示例。
在下文中一共展示了PackageManager.AddFeed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartPackageManager
internal void StartPackageManager()
{
// ok, we're looking like we're ready to need the package manager.
// make sure its running.
PackageManager.Instance.ConnectAndWait("autopackage", null, 15000);
PackageManager = PackageManager.Instance;
PackageManager.AddFeed(Environment.CurrentDirectory,true);
if (AutopackageMain._verbose) {
PackageManager.SetLogging(true, true, true);
}
}
示例2: Main
/// <summary>
/// The (non-static) startup method
/// </summary>
/// <param name = "args">
/// The command line arguments.
/// </param>
/// <returns>
/// Process return code.
/// </returns>
protected override int Main(IEnumerable<string> args)
{
try
{
_package.CertificateFile = _certificateSettings["#CurrentCertificate"].EncryptedStringValue;
PackageManager.Instance.Connect("autopackage");
if (!PackageManager.Instance.IsReady.WaitOne(5000)) {
//Verbose("# not connected...");
throw new ConsoleException("# Unable to connect to CoApp Service.");
}
_pkgMgr = PackageManager.Instance;
PropertySheet propSheet;
_pkgMgr.AddFeed(Environment.CurrentDirectory);
var exceptions = new List<Exception>();
#region command line parsing
var configLoaded = false;
// default:
var options = args.Switches();
var parameters = args.Parameters();
foreach (var arg in options.Keys)
{
var argumentParameters = options[arg];
switch (arg)
{
/* options */
/* global switches */
case "load-config":
// all ready done, but don't get too picky.
break;
case "load":
propSheet = PropertySheet.Load(argumentParameters.First());
PropSheetParser parser = new PropSheetParser(_package);
//parser.Parse(propSheet);
configLoaded = true;
break;
case "nologo":
this.Assembly().SetLogo(string.Empty);
break;
case "show-tools":
_showTools = Boolean.Parse(argumentParameters.First());
break;
case "password":
_package.CertificatePassword = argumentParameters.First();
break;
case "autosign":
_autosign = true;
break;
case "remember":
_remember = true;
break;
case "accept-old-bs":
_acceptOldBs = true;
break;
case "help":
return Help();
default:
throw new ConsoleException(Resources.UnknownParameter, arg);
}
}
Logo();
if (!configLoaded)
throw new ConsoleException(Resources.NoConfigFileLoaded);
#endregion
// GS01: I'm putting this in here so that feed resoltion happens before we actually get around to doing something.
// Look into the necessity later.
// Tasklet.WaitforCurrentChildTasks();
#region Tool Scanning
Console.Write(Resources.ToolLookup);
_candle = new ProcessUtility(ProgramFinder.ProgramFilesAndDotNet.ScanForFile("candle.exe"));
//.........这里部分代码省略.........