public static FormatPart Create(FormatOptions type)
 {
     return(new FormatPart()
     {
         Type = type.ToString()
     });
 }
コード例 #2
0
        private string Format(string original, FormatOptions options)
        {
            switch (options)
            {
            case FormatOptions.None:
                return(RemoveFormatting(original));

            case FormatOptions.Indented:
                return(FormatIndented(original));

            default:
                throw new Exception($"Unxepted format option {options.ToString()}.");
            }
        }
コード例 #3
0
 public Format(FormatOptions target)
 {
     Value = target.ToString();
 }