Skip to content

Commit

Permalink
PaletteDescriptor.Extensions was turned into ReadOnlyCollection<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehonti Ramos committed Aug 5, 2023
1 parent 4d53a6b commit 578a033
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Pinta.Core/PaletteFormats/PaletteDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,33 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using Gtk;

namespace Pinta.Core
{
public sealed class PaletteDescriptor
{
public string[] Extensions { get; }
public ReadOnlyCollection<string> Extensions { get; }

public IPaletteLoader Loader { get; }

public IPaletteSaver Saver { get; }

public FileFilter Filter { get; }

public PaletteDescriptor (string displayPrefix, string[] extensions, IPaletteLoader loader, IPaletteSaver saver)
public PaletteDescriptor (string displayPrefix, IEnumerable<string> extensions, IPaletteLoader loader, IPaletteSaver saver)
{
this.Extensions = extensions;
this.Extensions = extensions.ToReadOnlyCollection ();
this.Loader = loader;
this.Saver = saver;

var ff = FileFilter.New ();
StringBuilder formatNames = new StringBuilder ();

foreach (string ext in extensions) {
foreach (string ext in Extensions) {
if (formatNames.Length > 0)
formatNames.Append (", ");

Expand Down

0 comments on commit 578a033

Please sign in to comment.