Exemple #1
0
 internal static OutputOption Combine(OutputOption o1, OutputOption o2)
 {
     return(new OutputOption(o1)
     {
         Culture = o1.Culture ?? o2.Culture,
         Path = o1.Path ?? o2.Path
     });
 }
Exemple #2
0
 public PSDocumentOption()
 {
     // Set defaults
     Document  = new DocumentOption();
     Execution = new ExecutionOption();
     Markdown  = new MarkdownOption();
     Output    = new OutputOption();
 }
Exemple #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);
 }
Exemple #4
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);
        }
Exemple #5
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);
        }
Exemple #6
0
 public PSDocumentOption()
 {
     // Set defaults
     Configuration = new ConfigurationOption();
     Document      = new DocumentOption();
     Execution     = new ExecutionOption();
     Input         = new InputOption();
     Markdown      = new MarkdownOption();
     Output        = new OutputOption();
 }
Exemple #7
0
 internal OutputOption(OutputOption option)
 {
     Culture = option.Culture;
     Path    = option.Path;
 }
Exemple #8
0
 public bool Equals(OutputOption other)
 {
     return(other != null &&
            Culture == other.Culture &&
            Path == other.Path);
 }