|
1 | | -using System; |
| 1 | +using System; |
2 | 2 | using EPiServer.DataAnnotations; |
3 | 3 |
|
4 | 4 | namespace Geta.Optimizely.ContentTypeIcons.Attributes |
@@ -111,6 +111,74 @@ public ContentTypeIconAttribute( |
111 | 111 | FontSize = fontSize; |
112 | 112 | } |
113 | 113 |
|
| 114 | + /// <summary> |
| 115 | + /// Initializes a new instance of the <see cref="T:Geta.Optimizely.ContentTypeIcons.Attributes.ContentTypeIconAttribute" /> class. |
| 116 | + /// </summary> |
| 117 | + /// <param name="icon">The FontAwesome7Brands icon to be used</param> |
| 118 | + /// <param name="rotate">The rotation to be used, defaults to None</param> |
| 119 | + /// <param name="backgroundColor">The backgroundColor to be used when rendering the image (specified in hexadecimal, for example #000000)</param> |
| 120 | + /// <param name="foregroundColor">The foregroundColor to be used when rendering the image (specified in hexadecimal, for example #ffffff) </param> |
| 121 | + /// <param name="fontSize">The fontSize to be used, default value is 40</param> |
| 122 | + public ContentTypeIconAttribute( |
| 123 | + FontAwesome7Brands icon, |
| 124 | + Rotations rotate = Rotations.None, |
| 125 | + string backgroundColor = "", |
| 126 | + string foregroundColor = "", |
| 127 | + int fontSize = -1) |
| 128 | + : base(string.Empty) |
| 129 | + { |
| 130 | + Icon = icon; |
| 131 | + Rotate = rotate; |
| 132 | + BackgroundColor = backgroundColor; |
| 133 | + ForegroundColor = foregroundColor; |
| 134 | + FontSize = fontSize; |
| 135 | + } |
| 136 | + |
| 137 | + /// <summary> |
| 138 | + /// Initializes a new instance of the <see cref="T:Geta.Optimizely.ContentTypeIcons.Attributes.ContentTypeIconAttribute" /> class. |
| 139 | + /// </summary> |
| 140 | + /// <param name="icon">The FontAwesome7Regular icon to be used</param> |
| 141 | + /// <param name="rotate">The rotation to be used, defaults to None</param> |
| 142 | + /// <param name="backgroundColor">The backgroundColor to be used when rendering the image (specified in hexadecimal, for example #000000)</param> |
| 143 | + /// <param name="foregroundColor">The foregroundColor to be used when rendering the image (specified in hexadecimal, for example #ffffff) </param> |
| 144 | + /// <param name="fontSize">The fontSize to be used, default value is 40</param> |
| 145 | + public ContentTypeIconAttribute( |
| 146 | + FontAwesome7Regular icon, |
| 147 | + Rotations rotate = Rotations.None, |
| 148 | + string backgroundColor = "", |
| 149 | + string foregroundColor = "", |
| 150 | + int fontSize = -1) |
| 151 | + : base(string.Empty) |
| 152 | + { |
| 153 | + Icon = icon; |
| 154 | + Rotate = rotate; |
| 155 | + BackgroundColor = backgroundColor; |
| 156 | + ForegroundColor = foregroundColor; |
| 157 | + FontSize = fontSize; |
| 158 | + } |
| 159 | + |
| 160 | + /// <summary> |
| 161 | + /// Initializes a new instance of the <see cref="T:Geta.Optimizely.ContentTypeIcons.Attributes.ContentTypeIconAttribute" /> class. |
| 162 | + /// </summary> |
| 163 | + /// <param name="icon">The FontAwesome7Solid icon to be used</param> |
| 164 | + /// <param name="rotate">The rotation to be used, defaults to None</param> |
| 165 | + /// <param name="backgroundColor">The backgroundColor to be used when rendering the image (specified in hexadecimal, for example #000000)</param> |
| 166 | + /// <param name="foregroundColor">The foregroundColor to be used when rendering the image (specified in hexadecimal, for example #ffffff) </param> |
| 167 | + /// <param name="fontSize">The fontSize to be used, default value is 40</param> |
| 168 | + public ContentTypeIconAttribute( |
| 169 | + FontAwesome7Solid icon, |
| 170 | + Rotations rotate = Rotations.None, |
| 171 | + string backgroundColor = "", |
| 172 | + string foregroundColor = "", |
| 173 | + int fontSize = -1) |
| 174 | + : base(string.Empty) |
| 175 | + { |
| 176 | + Icon = icon; |
| 177 | + Rotate = rotate; |
| 178 | + BackgroundColor = backgroundColor; |
| 179 | + ForegroundColor = foregroundColor; |
| 180 | + FontSize = fontSize; |
| 181 | + } |
114 | 182 |
|
115 | 183 | /// <summary> |
116 | 184 | /// Initializes a new instance of the <see cref="T:Geta.Optimizely.ContentTypeIcons.Attributes.ContentTypeIconAttribute" /> class. |
|
0 commit comments