System.Xml.Xsl.XsltOld.StateMachine.StateOnly C# (CSharp) Method

StateOnly() static private method

static private StateOnly ( int state ) : int
state int
return int
        internal static int StateOnly(int state) {
            return state & StateMask;
        }

Usage Example

Ejemplo n.º 1
0
        internal bool BeginEvent(XPathNodeType nodeType, string prefix, string name, string nspace, bool empty, Object htmlProps, bool search)
        {
            Debug.Assert(this.xsm != null);

            int stateOutlook = this.xsm.BeginOutlook(nodeType);

            if (this.ignoreLevel > 0 || stateOutlook == StateMachine.Error)
            {
                this.ignoreLevel++;
                return(true);                        // We consumed the event, so pretend it was output.
            }

            switch (this.builder.BeginEvent(stateOutlook, nodeType, prefix, name, nspace, empty, htmlProps, search))
            {
            case OutputResult.Continue:
                this.xsm.Begin(nodeType);
                Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State);
                Debug.Assert(ExecutionResult == ExecResult.Continue);
                return(true);

            case OutputResult.Interrupt:
                this.xsm.Begin(nodeType);
                Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State);
                ExecutionResult = ExecResult.Interrupt;
                return(true);

            case OutputResult.Overflow:
                ExecutionResult = ExecResult.Interrupt;
                return(false);

            case OutputResult.Error:
                this.ignoreLevel++;
                return(true);

            case OutputResult.Ignore:
                return(true);

            default:
                Debug.Fail("Unexpected result of RecordBuilder.BeginEvent()");
                return(true);
            }
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.StateMachine::StateOnly