The FieldScanner object is used to scan an class for fields marked with an XML annotation. All fields that contain an XML annotation are added as Contact objects to the list of contacts for the class. This scans the object by checking the class hierarchy, this allows a subclass to override a super class annotated field, although this should be used rarely.
Inheritance: ContactList
        protected override CalculatedFieldBase CreateInitializedCalculatedField(
            PieceTable pieceTable,
            Token firstToken,
            FieldScanner scanner)
        {
            Token chartToken = firstToken;

            if (chartToken != null)
            {
                if (String.Equals(chartToken.Value, "CHART", StringComparison.OrdinalIgnoreCase))
                {
                    return(CreateInitializedChartField(pieceTable, scanner));
                }
            }

            return(base.CreateInitializedCalculatedField(
                       pieceTable,
                       firstToken,
                       scanner));
        }
        static CalculatedFieldBase CreateInitializedChartField(PieceTable pieceTable, FieldScanner scanner)
        {
            CalculatedFieldBase field = new ChartField();

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

            InstructionCollection instructions = ParseInstructions(scanner, field);

            field.Initialize(pieceTable, instructions);
            return(field);
        }
コード例 #3
0
 public void SetupScanner()
 {
     _scanner = new FieldScanner(Module, ModelFactory, Logger);
 }