ValueOf() private method

private ValueOf ( ActionFrame context, int key ) : String
context ActionFrame
key int
return String
Beispiel #1
0
        internal override void Execute(Processor processor, ActionFrame frame)
        {
            Debug.Assert(processor != null && frame != null);

            switch (frame.State)
            {
                case Initialized:
                    Debug.Assert(frame != null);
                    Debug.Assert(frame.NodeSet != null);

                    string value = processor.ValueOf(frame, _selectKey);

                    if (processor.TextEvent(value, _disableOutputEscaping))
                    {
                        frame.Finished();
                    }
                    else
                    {
                        frame.StoredOutput = value;
                        frame.State = ResultStored;
                    }
                    break;

                case ResultStored:
                    Debug.Assert(frame.StoredOutput != null);
                    processor.TextEvent(frame.StoredOutput);
                    frame.Finished();
                    break;

                default:
                    Debug.Fail("Invalid ValueOfAction execution state");
                    break;
            }
        }
Beispiel #2
0
        internal override void Execute(Processor processor, ActionFrame frame)
        {
            Debug.Assert(processor != null && frame != null);

            switch (frame.State)
            {
            case Initialized:
                Debug.Assert(frame != null);
                Debug.Assert(frame.NodeSet != null);

                string?value = processor.ValueOf(frame, _selectKey);

                if (processor.TextEvent(value, _disableOutputEscaping))
                {
                    frame.Finished();
                }
                else
                {
                    frame.StoredOutput = value;
                    frame.State        = ResultStored;
                }
                break;

            case ResultStored:
                Debug.Assert(frame.StoredOutput != null);
                processor.TextEvent(frame.StoredOutput);
                frame.Finished();
                break;

            default:
                Debug.Fail("Invalid ValueOfAction execution state");
                break;
            }
        }