本文整理汇总了C#中MonoDevelop.PackageManagement.ProgressMonitorStatusMessage类的典型用法代码示例。如果您正苦于以下问题:C# ProgressMonitorStatusMessage类的具体用法?C# ProgressMonitorStatusMessage怎么用?C# ProgressMonitorStatusMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProgressMonitorStatusMessage类属于MonoDevelop.PackageManagement命名空间,在下文中一共展示了ProgressMonitorStatusMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public void Run (ProgressMonitorStatusMessage progressMessage, IPackageAction action)
{
RunProgressMessage = progressMessage;
ActionRun = action;
RunAction (progressMessage, action);
}
示例2: Run
public void Run (ProgressMonitorStatusMessage progressMessage, IEnumerable<IPackageAction> actions)
{
AddInstallActionsToPendingQueue (actions);
packageManagementEvents.OnPackageOperationsStarting ();
runCount++;
BackgroundDispatch (() => TryRunActionsWithProgressMonitor (progressMessage, actions.ToList ()));
}
示例3: RestorePackages
void RestorePackages(IProgressMonitor progressMonitor, ProgressMonitorStatusMessage progressMessage)
{
var commandLine = new NuGetPackageRestoreCommandLine(solution);
progressMonitor.Log.WriteLine(commandLine.ToString());
RestorePackages(progressMonitor, progressMessage, commandLine);
}
示例4: Update
void Update (UpdateAllPackagesInSolution updateAllPackages, ProgressMonitorStatusMessage progressMessage)
{
try {
List<UpdatePackageAction> updateActions = updateAllPackages.CreateActions ().ToList ();
PackageManagementServices.BackgroundPackageActionRunner.Run (progressMessage, updateActions);
} catch (Exception ex) {
PackageManagementServices.BackgroundPackageActionRunner.ShowError (progressMessage, ex);
}
}
示例5: CheckForUpdatesProgressMonitor
public CheckForUpdatesProgressMonitor (
IPackageManagementProgressMonitorFactory progressMonitorFactory,
IPackageManagementEvents packageEvents)
{
progressMessage = ProgressMonitorStatusMessageFactory.CreateCheckingForPackageUpdatesMessage ();
this.progressMonitor = progressMonitorFactory.CreateProgressMonitor (progressMessage.Status);
eventMonitor = new PackageUpdatesEventMonitor (progressMonitor, packageEvents);
}
示例6: CheckForPackageUpdates
void CheckForPackageUpdates (IProgressMonitor progressMonitor, ProgressMonitorStatusMessage progressMessage)
{
updatedPackagesInSolution.CheckForUpdates ();
if (updatedPackagesInSolution.AnyUpdates ()) {
progressMonitor.ReportSuccess (GettextCatalog.GetString ("Package updates are available."));
} else {
progressMonitor.ReportSuccess (progressMessage.Success);
}
}
示例7: Restore
public void Restore (ProgressMonitorStatusMessage progressMessage)
{
try {
if (AnyMissingPackages ()) {
RestoreWithProgressMonitor (progressMessage);
}
} catch (Exception ex) {
LoggingService.LogInternalError (ex);
RestoreFailed = true;
}
}
示例8: UpdatePackagesProgressMonitorStatusMessage
public UpdatePackagesProgressMonitorStatusMessage (
IEnumerable<IPackageManagementProject> projects,
string packagesUpToDateMessage,
string packagesUpToDateWarningMessage,
ProgressMonitorStatusMessage message)
: base (message.Status, message.Success, message.Error, message.Warning)
{
this.packagesUpToDateMessage = packagesUpToDateMessage;
this.packagesUpToDateWarningMessage = packagesUpToDateWarningMessage;
monitor = new UpdatedPackagesMonitor (projects);
}
示例9: RemovePackage
void RemovePackage (PackageReferenceNode packageReferenceNode, ProgressMonitorStatusMessage progressMessage)
{
IPackageManagementProject project = PackageManagementServices.Solution.GetActiveProject ();
UninstallPackageAction action = project.CreateUninstallPackageAction ();
action.Package = project.FindPackage (packageReferenceNode.Id);
if (action.Package != null) {
PackageManagementServices.BackgroundPackageActionRunner.Run (progressMessage, action);
} else {
ShowMissingPackageError (progressMessage, packageReferenceNode);
}
}
示例10: Run
public void Run (PackageReferenceNode packageReferenceNode, ProgressMonitorStatusMessage progressMessage)
{
try {
IPackageManagementProject project = solution.GetActiveProject ();
ReinstallPackageAction action = project.CreateReinstallPackageAction ();
action.PackageId = packageReferenceNode.Id;
action.PackageVersion = packageReferenceNode.Version;
runner.Run (progressMessage, action);
} catch (Exception ex) {
runner.ShowError (progressMessage, ex);
}
}
示例11: RunInternal
void RunInternal (IProgressMonitor progressMonitor, ProgressMonitorStatusMessage progressMessage)
{
var commandLine = new MonoPclCommandLine () {
List = true
};
commandLine.BuildCommandLine ();
progressMonitor.ShowPackageConsole ();
progressMonitor.Log.WriteLine (commandLine.ToString ());
progressMonitor.Log.WriteLine ();
RunMonoPcl (progressMonitor, progressMessage, commandLine);
}
示例12: CheckForPackageUpdates
void CheckForPackageUpdates (
ProgressMonitor progressMonitor,
ProgressMonitorStatusMessage progressMessage,
PackageUpdatesEventMonitor eventMonitor)
{
updatedPackagesInSolution.CheckForUpdates ();
if (updatedPackagesInSolution.AnyUpdates ()) {
progressMonitor.ReportSuccess (GettextCatalog.GetString ("Package updates are available."));
} else if (eventMonitor.WarningReported) {
progressMonitor.ReportWarning (progressMessage.Warning);
} else {
progressMonitor.ReportSuccess (progressMessage.Success);
}
}
示例13: Run
public void Run (ProgressMonitorStatusMessage progressMessage)
{
IProgressMonitor progressMonitor = CreateProgressMonitor (progressMessage);
try {
RestorePackages(progressMonitor, progressMessage);
} catch (Exception ex) {
LoggingService.LogInternalError (ex);
progressMonitor.Log.WriteLine(ex.Message);
progressMonitor.ReportError (progressMessage.Error, null);
progressMonitor.ShowPackageConsole ();
progressMonitor.Dispose();
RestoreFailed = true;
}
}
示例14: Run
public void Run (PackageReferenceNode packageReferenceNode, ProgressMonitorStatusMessage progressMessage)
{
try {
var solutionManager = PackageManagementServices.Workspace.GetSolutionManager (packageReferenceNode.Project.ParentSolution);
var action = new ReinstallNuGetPackageAction (
packageReferenceNode.Project,
solutionManager);
action.PackageId = packageReferenceNode.Id;
action.Version = packageReferenceNode.Version;
runner.Run (progressMessage, action);
} catch (Exception ex) {
runner.ShowError (progressMessage, ex);
}
}
示例15: Run
public void Run (ProgressMonitorStatusMessage progressMessage)
{
using (ProgressMonitor progressMonitor = CreateProgressMonitor (progressMessage)) {
using (PackageManagementEventsMonitor eventMonitor = CreateEventMonitor (progressMonitor)) {
try {
RestorePackages (progressMonitor, progressMessage);
} catch (Exception ex) {
LoggingService.LogError (progressMessage.Error, ex);
progressMonitor.Log.WriteLine (ex.Message);
progressMonitor.ReportError (progressMessage.Error, null);
progressMonitor.ShowPackageConsole ();
progressMonitor.Dispose ();
RestoreFailed = true;
}
}
}
}