Example #1
0
 public PSDocumentOption()
 {
     // Set defaults
     Document  = new DocumentOption();
     Execution = new ExecutionOption();
     Markdown  = new MarkdownOption();
     Output    = new OutputOption();
 }
Example #2
0
 internal MarkdownOption(MarkdownOption option)
 {
     WrapSeparator     = option.WrapSeparator;
     Encoding          = option.Encoding;
     SkipEmptySections = option.SkipEmptySections;
     ColumnPadding     = option.ColumnPadding;
     UseEdgePipes      = option.UseEdgePipes;
 }
Example #3
0
 public PSDocumentOption(PSDocumentOption option)
 {
     // Set from existing option instance
     Document  = new DocumentOption(option?.Document);
     Execution = new ExecutionOption(option?.Execution);
     Markdown  = new MarkdownOption(option?.Markdown);
     Output    = new OutputOption(option?.Output);
 }
Example #4
0
 public PSDocumentOption(PSDocumentOption option)
 {
     // Set from existing option instance
     Markdown = new MarkdownOption
     {
         WrapSeparator = option.Markdown.WrapSeparator
     };
 }
Example #5
0
 public bool Equals(MarkdownOption other)
 {
     return(other != null &&
            ColumnPadding == other.ColumnPadding &&
            Encoding == other.Encoding &&
            SkipEmptySections == other.SkipEmptySections &&
            UseEdgePipes == other.UseEdgePipes &&
            WrapSeparator == other.WrapSeparator);
 }
Example #6
0
        private PSDocumentOption(string sourcePath, PSDocumentOption option)
        {
            SourcePath = sourcePath;

            // Set from existing option instance
            Document  = new DocumentOption(option?.Document);
            Execution = new ExecutionOption(option?.Execution);
            Markdown  = new MarkdownOption(option?.Markdown);
            Output    = new OutputOption(option?.Output);
        }
Example #7
0
        private static PSDocumentOption Combine(PSDocumentOption o1, PSDocumentOption o2)
        {
            var result = new PSDocumentOption(o1?.SourcePath ?? o2?.SourcePath, o1);

            result.Document  = DocumentOption.Combine(result.Document, o2?.Document);
            result.Execution = ExecutionOption.Combine(result.Execution, o2?.Execution);
            result.Markdown  = MarkdownOption.Combine(result.Markdown, o2?.Markdown);
            result.Output    = OutputOption.Combine(result.Output, o2?.Output);
            return(result);
        }
Example #8
0
 public PSDocumentOption()
 {
     // Set defaults
     Configuration = new ConfigurationOption();
     Document      = new DocumentOption();
     Execution     = new ExecutionOption();
     Input         = new InputOption();
     Markdown      = new MarkdownOption();
     Output        = new OutputOption();
 }
Example #9
0
 internal static MarkdownOption Combine(MarkdownOption o1, MarkdownOption o2)
 {
     return(new MarkdownOption(o1)
     {
         ColumnPadding = o1.ColumnPadding ?? o2.ColumnPadding,
         Encoding = o1.Encoding ?? o2.Encoding,
         SkipEmptySections = o1.SkipEmptySections ?? o2.SkipEmptySections,
         UseEdgePipes = o1.UseEdgePipes ?? o2.UseEdgePipes,
         WrapSeparator = o1.WrapSeparator ?? o2.WrapSeparator
     });
 }
Example #10
0
        public PSDocumentOption(PSDocumentOption option)
        {
            // Set from existing option instance
            Markdown = new MarkdownOption
            {
                WrapSeparator     = option.Markdown.WrapSeparator,
                Encoding          = option.Markdown.Encoding,
                SkipEmptySections = option.Markdown.SkipEmptySections,
                ColumnPadding     = option.Markdown.ColumnPadding,
                UseEdgePipes      = option.Markdown.UseEdgePipes
            };

            Execution = new ExecutionOption
            {
                LanguageMode = option.Execution.LanguageMode
            };
        }
Example #11
0
 public PSDocumentOption()
 {
     // Set defaults
     Markdown  = new MarkdownOption();
     Execution = new ExecutionOption();
 }