mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
- Added check for dependencies, which can be installed from the builder. - Replaced CosmosTask with CosmosBuildDefinition, which is much simpler. - The builder can be opened without any command line arguments. - If the VS path is not specified as a command line argument, it can be selected in a dialog.
22 lines
814 B
C#
22 lines
814 B
C#
using System;
|
|
using System.Windows;
|
|
using Microsoft.VisualStudio.Setup.Configuration;
|
|
|
|
namespace Cosmos.Build.Builder.Services.VisualStudioSetup
|
|
{
|
|
internal class VisualStudioSetupErrorInfo : ISetupErrorInfo
|
|
{
|
|
private ISetupErrorInfo _setupErrorInfo;
|
|
|
|
public VisualStudioSetupErrorInfo(ISetupErrorInfo setupErrorInfo)
|
|
{
|
|
_setupErrorInfo = setupErrorInfo;
|
|
}
|
|
|
|
public int GetErrorHResult() => RunOnMainThread(_setupErrorInfo.GetErrorHResult);
|
|
public string GetErrorClassName() => RunOnMainThread(_setupErrorInfo.GetErrorClassName);
|
|
public string GetErrorMessage() => RunOnMainThread(_setupErrorInfo.GetErrorMessage);
|
|
|
|
private static T RunOnMainThread<T>(Func<T> function) => Application.Current.Dispatcher.Invoke(function);
|
|
}
|
|
}
|