private object RemoveDynamicsCRMSolutionAsync(OperationRunner context) { DynamicsCrmClient client = new DynamicsCrmClient( DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationName, DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationDomainName, WizardContext.TokenProvider); client.SetLogger(context.Logger); return(client.DeleteSolutionAsync(DataModel.InstallationConfiguration.DynamicsCrm.SolutionUniqueName).Result); }
/// <summary> /// Initializes a new instance of the <see cref="DeployDynamicsCRMSolutionInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public DeployDynamicsCRMSolutionInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SequentialRunner = new OperationRunner( model.OperationsProgress, this, WizardContext.LogFileStream); LogOutputControl = DetailsRichTextBox; SequentialRunner.OnLog += WriteLog; SequentialRunner.OnComplete += SequentialRunner_OnComplete; DataModel.CurrentOperationRunner = SequentialRunner; _dynamicsCrmClient = new DynamicsCrmClient( DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationName, DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationDomainName, WizardContext.TokenProvider); _dynamicsCrmClient.SetLogger(SequentialRunner.Logger); DataModel.SuccessFinalStatusMessage = "Advocacy Platform installed successfully."; DataModel.FailureFinalStatusMessage = "Advocacy Platform failed to install."; // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; OperationsProgressControl.OperationsSource = DataModel.OperationsProgress; QueueOperations(); SequentialRunner.BeginOperationsAsync(); }