示例#1
0
        public static XmlDocVisibilityLevel?ReadVisibilityOption(this ArgsReader args)
        {
            string visibility = args.ReadOption("visibility");

            switch (visibility)
            {
            case "public":
                return(XmlDocVisibilityLevel.Public);

            case "protected":
                return(XmlDocVisibilityLevel.Protected);

            case "internal":
                return(XmlDocVisibilityLevel.Internal);

            case "private":
                return(XmlDocVisibilityLevel.Private);

            case null:
                return(null);

            default:
                throw new ArgsReaderException($"Unknown visibility option: {visibility}");
            }
        }
示例#2
0
        public static string ReadNewLineOption(this ArgsReader args)
        {
            string value = args.ReadOption("newline");

            if (value == null)
            {
                return(null);
            }

            switch (value)
            {
            case "auto":
                return(null);

            case "lf":
                return("\n");

            case "crlf":
                return("\r\n");

            default:
                throw new ArgsReaderException($"Invalid new line '{value}'. (Should be 'auto', 'lf', or 'crlf'.)");
            }
        }
示例#3
0
 public static string ReadPermalinkStyle(this ArgsReader args)
 {
     return(args.ReadOption("permalink"));
 }
示例#4
0
 public static string ReadFrontMatter(this ArgsReader args)
 {
     return(args.ReadOption("front-matter"));
 }
示例#5
0
 public static string ReadSourceOption(this ArgsReader args)
 {
     return(args.ReadOption("source"));
 }
示例#6
0
 public static string ReadExternalOption(this ArgsReader args)
 {
     return(args.ReadOption("external"));
 }
示例#7
0
 public static string ReadNamespaceOption(this ArgsReader args)
 {
     return(args.ReadOption("namespace"));
 }
示例#8
0
 public static string ReadTocPrefix(this ArgsReader args)
 {
     return(args.ReadOption("toc-prefix"));
 }