Skip to content

Commit

Permalink
A little bit of code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrdev committed Nov 13, 2019
1 parent e006d3f commit 6a7efbb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 28 deletions.
4 changes: 2 additions & 2 deletions fa2cs/CodeWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ public class CodeWriter
{
const string indent = " ";

public string Write(List<FontAwesomeIcon> icons)
public string Write(IEnumerable<FontAwesomeIcon> icons)
{
Console.Write("Generating C# code...");

var classTemplate = ResourcesHelper.ReadResourceContent("ClassTemplate.txt");
var propertyTemplate = ResourcesHelper.ReadResourceContent("PropertyTemplate.txt");

List<string> properties = new List<string>();
var properties = new List<string>();

foreach (var icon in icons)
{
Expand Down
2 changes: 1 addition & 1 deletion fa2cs/FontAwesomeDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace fa2cs
{
public class FontAwesomeDownloader
{
public async Task<List<FontAwesomeIcon>> DownloadIconCodes(string endpoint)
public async Task<IReadOnlyList<FontAwesomeIcon>> DownloadIconCodes(string endpoint)
{
using (var client = new HttpClient())
{
Expand Down
5 changes: 0 additions & 5 deletions fa2cs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class MainClass
{
public const string Endpoint = "https://fontawesome.com/cheatsheet";

public const string FontAwesomeIconsAssemblyFileName = "FontAwesome.IconCodes.dll";

public const string FontAwesomeIconsAssemblyDocsFileName = "FontAwesome.IconCodes.xml";

public static async Task Main(string[] args)
{
var exportPath = AssemblyHelper.EntryAssemblyDirectory;
Expand All @@ -39,7 +35,6 @@ public static async Task Main(string[] args)

var code = codeWriter.Write(icons);

File.WriteAllText(Path.Combine(outputPath, "readme.txt"), ResourcesHelper.ReadResourceContent("readme.txt"));
File.WriteAllText(Path.Combine(exportPath, "FontAwesomeIcons.cs"), code);

OpenFileHelper.OpenAndSelect(exportPath);
Expand Down
14 changes: 0 additions & 14 deletions fa2cs/Resources/readme.txt

This file was deleted.

6 changes: 0 additions & 6 deletions fa2cs/fa2cs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@
<EmbeddedResource Include="Resources\PropertyTemplate.txt">
<LogicalName>PropertyTemplate.txt</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\AssemblyInfoTemplate.txt">
<LogicalName>AssemblyInfoTemplate.txt</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\readme.txt">
<LogicalName>readme.txt</LogicalName>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.2\build\SQLitePCLRaw.lib.e_sqlite3.linux.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.2\build\SQLitePCLRaw.lib.e_sqlite3.linux.targets')" />
Expand Down

0 comments on commit 6a7efbb

Please sign in to comment.