Skip to content

Commit 66431c2

Browse files
author
Warren Buckley
committed
Clean up usings & adds XML comments
1 parent 8337b00 commit 66431c2

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Our.Umbraco.TagHelpers/InlineSvgTagHelper.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
using Microsoft.AspNetCore.Hosting;
22
using Microsoft.AspNetCore.Razor.TagHelpers;
3-
using Microsoft.Extensions.FileProviders;
43
using System;
5-
using System.Collections.Generic;
64
using System.IO;
7-
using System.Linq;
8-
using System.Text;
95
using System.Text.RegularExpressions;
10-
using System.Threading.Tasks;
116
using Umbraco.Cms.Core.IO;
127
using Umbraco.Cms.Core.Models.PublishedContent;
138
using Umbraco.Extensions;
149

1510
namespace Our.Umbraco.TagHelpers
1611
{
12+
/// <summary>
13+
/// This allows you to inline an SVG file into the DOM
14+
/// from a file on disk or an Umbraco Media Item
15+
/// </summary>
1716
[HtmlTargetElement("our-svg")]
1817
public class InlineSvgTagHelper : TagHelper
1918
{
@@ -26,9 +25,17 @@ public InlineSvgTagHelper(MediaFileManager mediaFileManager, IWebHostEnvironment
2625
_webHostEnvironment = webHostEnvironment;
2726
}
2827

28+
/// <summary>
29+
/// A filepath to a SVG on disk such as /assets/icon.svg
30+
/// NOTE: You cannot use this in conjuction with the media-item attribute
31+
/// </summary>
2932
[HtmlAttributeName("src")]
3033
public string FileSource { get; set; }
3134

35+
/// <summary>
36+
/// An IPublishedContent Umbraco Media Item that has an .svg file extension
37+
/// NOTE: You cannot use this in conjuction with the src attribute
38+
/// </summary>
3239
[HtmlAttributeName("media-item")]
3340
public IPublishedContent MediaItem { get; set; }
3441

0 commit comments

Comments
 (0)