Skip to content

Commit

Permalink
Addressing warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Jan 20, 2024
1 parent ee78f1b commit 482c92f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
12 changes: 3 additions & 9 deletions Lombiq.UIKit/TagHelpers/BootstrapSplitButtonTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
namespace Lombiq.UIKit.TagHelpers;

[HtmlTargetElement("bootstrap-split-button", Attributes = "options")]
public class BootstrapSplitButtonTagHelper : TagHelper
public class BootstrapSplitButtonTagHelper(IDisplayHelper displayHelper, IShapeFactory factory) : TagHelper
{
private readonly IDisplayHelper _displayHelper;
private readonly IShapeFactory _shapeFactory;
private readonly IDisplayHelper _displayHelper = displayHelper;
private readonly IShapeFactory _shapeFactory = factory;

[HtmlAttributeName("type")]
public string Type { get; set; }
Expand All @@ -32,12 +32,6 @@ public class BootstrapSplitButtonTagHelper : TagHelper
[HtmlAttributeName("options")]
public IEnumerable<(string Url, string Text)> Options { get; set; }

public BootstrapSplitButtonTagHelper(IDisplayHelper displayHelper, IShapeFactory factory)
{
_displayHelper = displayHelper;
_shapeFactory = factory;
}

public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
IShape shape = await _shapeFactory.New.BootstrapSplitButton(
Expand Down
5 changes: 1 addition & 4 deletions Lombiq.UIKit/TagHelpers/EditorTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Lombiq.UIKit.TagHelpers;

[HtmlTargetElement("editor", Attributes = nameof(Type) + "," + nameof(For))]
public class EditorTagHelper : BaseShapeTagHelper
public class EditorTagHelper(IShapeFactory shapeFactory, IDisplayHelper displayHelper) : BaseShapeTagHelper(shapeFactory, displayHelper)
{
private const string UIKitEditorBaseName = "UIKit__Editor__";

Expand Down Expand Up @@ -76,9 +76,6 @@ public class EditorTagHelper : BaseShapeTagHelper
[HtmlAttributeName(nameof(HideSelectedFromDropdownList))]
public bool HideSelectedFromDropdownList { get; set; }

public EditorTagHelper(IShapeFactory shapeFactory, IDisplayHelper displayHelper)
: base(shapeFactory, displayHelper) { }

public override Task ProcessAsync(TagHelperContext tagHelperContext, TagHelperOutput output)
{
Type = UIKitEditorBaseName + Type;
Expand Down

0 comments on commit 482c92f

Please sign in to comment.