Пример #1
0
        internal static ConfigurationOption Combine(ConfigurationOption o1, ConfigurationOption o2)
        {
            var result = new ConfigurationOption(o1);

            result.AddUnique(o2);
            return(result);
        }
Пример #2
0
 public PSDocumentOption()
 {
     // Set defaults
     Configuration = new ConfigurationOption();
     Document      = new DocumentOption();
     Execution     = new ExecutionOption();
     Input         = new InputOption();
     Markdown      = new MarkdownOption();
     Output        = new OutputOption();
 }
Пример #3
0
        private PSDocumentOption(string sourcePath, PSDocumentOption option)
        {
            SourcePath = sourcePath;

            // Set from existing option instance
            Configuration = new ConfigurationOption(option?.Configuration);
            Document      = new DocumentOption(option?.Document);
            Execution     = new ExecutionOption(option?.Execution);
            Input         = new InputOption(option?.Input);
            Markdown      = new MarkdownOption(option?.Markdown);
            Output        = new OutputOption(option?.Output);
        }
Пример #4
0
        private static PSDocumentOption Combine(PSDocumentOption o1, PSDocumentOption o2)
        {
            var result = new PSDocumentOption(o1?.SourcePath ?? o2?.SourcePath, o1);

            result.Configuration = ConfigurationOption.Combine(result.Configuration, o2?.Configuration);
            result.Document      = DocumentOption.Combine(result.Document, o2?.Document);
            result.Execution     = ExecutionOption.Combine(result.Execution, o2?.Execution);
            result.Input         = InputOption.Combine(result.Input, o2?.Input);
            result.Markdown      = MarkdownOption.Combine(result.Markdown, o2?.Markdown);
            result.Output        = OutputOption.Combine(result.Output, o2?.Output);
            return(result);
        }
Пример #5
0
 public ConfigurationOption(ConfigurationOption option)
     : base(option)
 {
 }