Esempio n. 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="valRef">Reference to the value that this filter refers to.</param>
        /// <param name="op">The operator to be applied.</param>
        /// <param name="time">The definition of time. Depending on the operator,
        /// this must be either a time instant or a time range.</param>
        /// <exception cref="ArgumentException">Thrown if the operator is incompatible with the time definition.</exception>
        public TemporalFilter(ValueReferenceType valRef, OperatorType op, Item time)
        {
            CheckConsistency(op, time);

            ValueReference = valRef;
            Operator       = op;
            Time           = time;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of a FormatterVisitor.
 /// </summary>
 /// <param name="writer">The text writer to write the text to.</param>
 /// <param name="options">The command options to use to augment the text generation.</param>
 public FormattingVisitor(TextWriter writer, CommandOptions options = null)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     this.writer = writer;
     this.options = options == null ? new CommandOptions() : options.Clone();
     this.commandType = CommandType.Unknown;
     this.sourceReferenceType = SourceReferenceType.Declaration;
     this.valueReferenceType = ValueReferenceType.Declaration;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of a FormatterVisitor.
 /// </summary>
 /// <param name="writer">The text writer to write the text to.</param>
 /// <param name="options">The command options to use to augment the text generation.</param>
 public FormattingVisitor(TextWriter writer, CommandOptions options = null)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     this.writer              = writer;
     this.options             = options == null ? new CommandOptions() : options.Clone();
     this.commandType         = CommandType.Unknown;
     this.sourceReferenceType = SourceReferenceType.Declaration;
     this.valueReferenceType  = ValueReferenceType.Declaration;
 }
Esempio n. 4
0
 private FormattingVisitor(
     TextWriter writer, 
     CommandOptions options, 
     int level, 
     CommandType commandType, 
     SourceReferenceType sourceType,
     ValueReferenceType projectionType)
 {
     this.writer = writer;
     this.options = options;
     this.level = level;
     this.commandType = commandType;
     this.sourceReferenceType = sourceType;
     this.valueReferenceType = projectionType;
 }
Esempio n. 5
0
 private FormattingVisitor(
     TextWriter writer,
     CommandOptions options,
     int level,
     CommandType commandType,
     SourceReferenceType sourceType,
     ValueReferenceType projectionType)
 {
     this.writer              = writer;
     this.options             = options;
     this.level               = level;
     this.commandType         = commandType;
     this.sourceReferenceType = sourceType;
     this.valueReferenceType  = projectionType;
 }
Esempio n. 6
0
 private FormattingVisitor forValueContext(ValueReferenceType type)
 {
     return new FormattingVisitor(writer, options, level, commandType, sourceReferenceType, type);
 }
Esempio n. 7
0
 private FormattingVisitor forValueContext(ValueReferenceType type)
 {
     return(new FormattingVisitor(writer, options, level, commandType, sourceReferenceType, type));
 }