Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tjorvenK committed Feb 28, 2024
1 parent 61514db commit 03b1d02
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface IFormatProvider<out T> where T : class, IFormat
/// <summary>
/// Returns the supported file extensions of the format provider.
/// </summary>
string[] SupportedFileExtensions { get; }
IEnumerable<string> SupportedFileExtensions { get; }

/// <summary>
/// Creates a new instance of the format builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ashampoo.Translation.Systems.Formats.AshLang;
public sealed class AshLangFormatProvider : IFormatProvider<AshLangFormat>
{
/// <inheritdoc />
public string Id { get; } = "ashlang";
public string Id => "ashlang";

/// <inheritdoc />
public AshLangFormat Create() => new();
Expand All @@ -20,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions => [".ashlang"];
public IEnumerable<string> SupportedFileExtensions => [".ashlang"];

/// <inheritdoc />
public IFormatBuilder<AshLangFormat> GetFormatBuilder() => new AshLangFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ashampoo.Translation.Systems.Formats.Gengo;
public sealed class GengoFormatProvider : IFormatProvider<GengoFormat>
{
/// <inheritdoc />
public string Id { get; } = "gengo";
public string Id => "gengo";

/// <inheritdoc />
public GengoFormat Create() => new();
Expand All @@ -20,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".xlsx", ".xls"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".xlsx", ".xls"];

/// <inheritdoc />
public IFormatBuilder<GengoFormat> GetFormatBuilder() => new GengoFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Ashampoo.Translation.Systems.Formats.JavaProperties;
public sealed class JavaPropertiesFormatProvider : IFormatProvider<JavaPropertiesFormat>
{
/// <inheritdoc />
public string Id { get; } = "javaProperties";
public string Id => "javaProperties";

/// <inheritdoc />
public JavaPropertiesFormat Create() => new();

Expand All @@ -19,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".properties"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".properties"];
/// <inheritdoc />
public IFormatBuilder<JavaPropertiesFormat> GetFormatBuilder() => new JavaPropertiesFormatBuilder();
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ashampoo.Translation.Systems.Formats.Json;
public sealed class JsonFormatProvider : IFormatProvider<JsonFormat>
{
/// <inheritdoc />
public string Id { get; } = "json";
public string Id => "json";

/// <inheritdoc />
public JsonFormat Create() => new();
Expand All @@ -20,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".json"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".json"];

/// <inheritdoc />
public IFormatBuilder<JsonFormat> GetFormatBuilder() => new JsonFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace Ashampoo.Translation.Systems.Formats.NLang;

/// <summary>
/// Implementation of <see cref="IFormatProvider"/> for the NLang format.
/// Implementation of <see cref="IFormatProvider{T}"/> for the NLang format.
/// </summary>
public sealed class NLangFormatProvider : IFormatProvider<NLangFormat>
{
/// <inheritdoc />
public string Id { get; } = "nlang";
public string Id => "nlang";

/// <inheritdoc />
public NLangFormat Create() => new();
Expand All @@ -20,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".nlang3"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".nlang3"];

/// <inheritdoc />
public IFormatBuilder<NLangFormat> GetFormatBuilder() => new NLangFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Ashampoo.Translation.Systems.Formats.PO;
public sealed class POFormatProvider : IFormatProvider<POFormat>
{
/// <inheritdoc />
public string Id { get; } = "po";
public string Id => "po";

/// <inheritdoc />
public POFormat Create() => new();
Expand All @@ -21,7 +21,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".po"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".po"];

/// <inheritdoc />
public IFormatBuilder<POFormat> GetFormatBuilder() => new POFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace Ashampoo.Translation.Systems.Formats.ResX;

/// <summary>
/// Implementation of <see cref="IFormatProvider"/> interface for the ResX format.
/// Implementation of <see cref="IFormatProvider{T}"/> interface for the ResX format.
/// </summary>
public sealed class ResXFormatProvider : IFormatProvider<ResXFormat>
{
/// <inheritdoc />
public string Id { get; } = "resx";
public string Id => "resx";

/// <inheritdoc />
public ResXFormat Create() => new();
Expand All @@ -20,7 +20,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".resx"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".resx"];

/// <inheritdoc />
public IFormatBuilder<ResXFormat> GetFormatBuilder() => new ResXFormatBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Ashampoo.Translation.Systems.Formats.TsProj;
public sealed class TsProjFormatProvider : IFormatProvider<TsProjFormat>
{
/// <inheritdoc />
public string Id { get; } = "tsproj";
public string Id => "tsproj";

/// <inheritdoc />
public TsProjFormat Create() => new();
Expand All @@ -18,7 +18,7 @@ public bool SupportsFileName(string fileName)
}

/// <inheritdoc />
public string[] SupportedFileExtensions { get; } = [".tsproj"];
public IEnumerable<string> SupportedFileExtensions { get; } = [".tsproj"];

/// <inheritdoc />
public IFormatBuilder<TsProjFormat> GetFormatBuilder() => new TsProjFormatBuilder();
Expand Down

0 comments on commit 03b1d02

Please sign in to comment.