Description:
Default string[] parser.

Added In: v0.45

Function

    public class UMFConfigStringArray : UMFConfigParser<string[]>
    {
        public string[] DefaultValues;
        public bool KeyBind;
        public bool RequiresRestart;
        public string[] AllowedValues;

        public UMFConfigStringArray(string[] defaultValues = default(string[]), bool isKeyBind = false, bool requiresRestart = false, params string[] allowedValues)
        {
            DefaultValues = defaultValues;
            KeyBind = isKeyBind;
            RequiresRestart = requiresRestart;
            AllowedValues = allowedValues;
        }

        public override string[] Parse(string value)
        {
            return value.Trim().Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
        }

        public override string ToString()
        {
            return string.Join(",", DefaultValues.ToArray());
        }

        public override string Default()
        {
            return string.Join(", ", DefaultValues.Take(2).ToArray());
        }

        public override string Allowed()
        {
            return (AllowedValues.Length > 0 ? string.Join(",", AllowedValues.Select(x => x.ToString()).ToArray()) : null);
        }

        public override string Restart()
        {
            return RequiresRestart.ToString();
        }

        public override string IsKeyBind()
        {
            return KeyBind.ToString();
        }
    }



Usage

//Coming soon



Examples

//Coming soon