<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace RedditSharp
{
    public class SubredditSettings
    {
        private const string SiteAdminUrl = "http://www.reddit.com/api/site_admin";
        private const string DeleteHeaderImageUrl = "http://www.reddit.com/api/delete_sr_header";

        private Reddit Reddit { get; set; }

        public Subreddit Subreddit { get; set; }

        public SubredditSettings(Subreddit subreddit, Reddit reddit)
        {
            Subreddit = subreddit;
            Reddit = reddit;
            // Default settings, for use when reduced information is given
            AllowAsDefault = true;
            Domain = null;
            Sidebar = string.Empty;
            Language = "en";
            Title = Subreddit.DisplayName;
            WikiEditKarma = 100;
            WikiEditAge = 10;
            UseDomainCss = false;
            UseDomainSidebar = false;
            HeaderHoverText = string.Empty;
            NSFW = false;
            PublicDescription = string.Empty;
            WikiEditMode = WikiEditMode.None;
            SubredditType = SubredditType.Public;
            ShowThumbnails = true;
            ContentOptions = ContentOptions.All;
        }

        public SubredditSettings(Subreddit subreddit, Reddit reddit, JObject json) : this(subreddit, reddit)
        {
            var data = json["data"];
            if (data["default_set"] != null)
                AllowAsDefault = data["default_set"].Value<bool>();
            if (data["domain"] != null)
                Domain = data["domain"].Value<string>();
            if (data["description"] != null)<commit_msg>Made constructor parameter order consistent<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace RedditSharp
{
    public class SubredditSettings
    {
        private const string SiteAdminUrl = "http://www.reddit.com/api/site_admin";
        private const string DeleteHeaderImageUrl = "http://www.reddit.com/api/delete_sr_header";

        private Reddit Reddit { get; set; }

        public Subreddit Subreddit { get; set; }

        public SubredditSettings(Reddit reddit, Subreddit subreddit)
        {
            Subreddit = subreddit;
            Reddit = reddit;
            // Default settings, for use when reduced information is given
            AllowAsDefault = true;
            Domain = null;
            Sidebar = string.Empty;
            Language = "en";
            Title = Subreddit.DisplayName;
            WikiEditKarma = 100;
            WikiEditAge = 10;
            UseDomainCss = false;
            UseDomainSidebar = false;
            HeaderHoverText = string.Empty;
            NSFW = false;
            PublicDescription = string.Empty;
            WikiEditMode = WikiEditMode.None;
            SubredditType = SubredditType.Public;
            ShowThumbnails = true;
            ContentOptions = ContentOptions.All;
        }

        public SubredditSettings(Subreddit subreddit, Reddit reddit, JObject json)
            : this(reddit, subreddit)
        {
            var data = json["data"];
            if (data["default_set"] != null)
                AllowAsDefault = data["default_set"].Value<bool>();
            if (data["domain"] != null)
                Domain = data["domain"].Value<string>();
            if (data["description"] != null)
{'fraction_non_alphanumeric': 0.09228187919463088, 'fraction_numerical': 0.002796420581655481, 'mean_word_length': 2.070386266094421, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3199899', 'n_tokens_mistral': 933, 'n_tokens_neox': 944, 'n_words': 231}