From 264e710615603a9f13678c391c52968b91331240 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Fri, 26 Jan 2024 15:17:28 -0800 Subject: [PATCH] Adding ratings capabilities --- src/GitHubActionsVSPackage.cs | 5 +++++ src/Options/ExtensionOptions.cs | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/GitHubActionsVSPackage.cs b/src/GitHubActionsVSPackage.cs index 54a1280..f056a28 100644 --- a/src/GitHubActionsVSPackage.cs +++ b/src/GitHubActionsVSPackage.cs @@ -33,6 +33,11 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke await this.RegisterCommandsAsync(); + // Setup ratings prompt + ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync(); + RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options); + prompt.RegisterSuccessfulUsage(); + this.RegisterToolWindows(); } diff --git a/src/Options/ExtensionOptions.cs b/src/Options/ExtensionOptions.cs index 2a33692..3704de3 100644 --- a/src/Options/ExtensionOptions.cs +++ b/src/Options/ExtensionOptions.cs @@ -10,7 +10,7 @@ internal partial class OptionsProvider public class ExtensionOptionsOptions : BaseOptionPage { } } -public class ExtensionOptions : BaseOptionModel +public class ExtensionOptions : BaseOptionModel, IRatingConfig { [Category("Query Settings")] [DisplayName("Max Runs")] @@ -29,4 +29,7 @@ public class ExtensionOptions : BaseOptionModel [Description("The interval (in seconds) to poll/refresh when pending/active jobs are going")] [DefaultValue(5)] public int RefreshInterval { get; set; } = 5; + + [Browsable(false)] + public int RatingRequests { get; set; } }