<commit_before>﻿using System;

namespace TinyPng
{

    public class ScaleWidthResizeOperation : ResizeOperation
    {
        public ScaleWidthResizeOperation(int width) : base (ResizeType.Scale, width, 0) { }
    }

    public class ScaleHeightResizeOperation : ResizeOperation
    {
        public ScaleHeightResizeOperation(int height) : base(ResizeType.Scale, 0, height) { }
    }

    public class FitResizeOperation : ResizeOperation
    {
        public FitResizeOperation(int width, int height) : base(ResizeType.Fit, width, height) { }
    }

    public class CoverResizeOperation : ResizeOperation
    {
        public CoverResizeOperation(int width, int height) : base(ResizeType.Cover, width, height)
        {
            if (width == 0)
            {
                throw new ArgumentException("You must specify a width", nameof(width));
            }
            if (height == 0)
            {
                throw new ArgumentException("You must specify a height", nameof(width));
            }
        }
    }

    public class ResizeOperation
    {
        public ResizeOperation(ResizeType type, int width, int height)
        {
            Method = type;
            Width = width;
            Height = height;
        }

        public int Width { get; set; }
        public int Height { get; set; }
        public ResizeType Method { get; set; }
    }

    public enum ResizeType
    {
        Fit,
        Scale,
        Cover
    }
}<commit_msg>made some of the props immutable<commit_after>﻿using System;

namespace TinyPng
{

    public class ScaleWidthResizeOperation : ResizeOperation
    {
        public ScaleWidthResizeOperation(int width) : base (ResizeType.Scale, width, 0) { }
    }

    public class ScaleHeightResizeOperation : ResizeOperation
    {
        public ScaleHeightResizeOperation(int height) : base(ResizeType.Scale, 0, height) { }
    }

    public class FitResizeOperation : ResizeOperation
    {
        public FitResizeOperation(int width, int height) : base(ResizeType.Fit, width, height) { }
    }

    public class CoverResizeOperation : ResizeOperation
    {
        public CoverResizeOperation(int width, int height) : base(ResizeType.Cover, width, height)
        {
            if (width == 0)
            {
                throw new ArgumentException("You must specify a width", nameof(width));
            }
            if (height == 0)
            {
                throw new ArgumentException("You must specify a height", nameof(width));
            }
        }
    }

    public class ResizeOperation
    {
        public ResizeOperation(ResizeType type, int width, int height)
        {
            Method = type;
            Width = width;
            Height = height;
        }

        public int Width { get; }
        public int Height { get; }
        public ResizeType Method { get; }
    }

    public enum ResizeType
    {
        Fit,
        Scale,
        Cover
    }
}
{'fraction_non_alphanumeric': 0.07971506105834464, 'fraction_numerical': 0.0027137042062415195, 'mean_word_length': 1.951951951951952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7295862', 'n_tokens_mistral': 811, 'n_tokens_neox': 779, 'n_words': 218}