System.Xml.Xsl.XsltOld.Compiler.GetYesNo C# (CSharp) Method

GetYesNo() private method

private GetYesNo ( string value ) : bool
value string
return bool
        internal bool GetYesNo(string value)
        {
            Debug.Assert(value != null);
            Debug.Assert((object)value == (object)Input.Value); // this is always true. Why we passing value to this function.
            if (value == "yes")
            {
                return true;
            }
            if (value == "no")
            {
                return false;
            }
            throw XsltException.Create(SR.Xslt_InvalidAttrValue, Input.LocalName, value);
        }

Usage Example

Esempio n. 1
0
        internal override bool CompileAttribute(Compiler compiler) {
            string name   = compiler.Input.LocalName;
            string value  = compiler.Input.Value;
            if (Ref.Equal(name, compiler.Atoms.Terminate)) {
                _Terminate = compiler.GetYesNo(value);
            }
            else {
                return false;
            }

            return true;
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.Compiler::GetYesNo