System.Xml.Tests.TCFullEndElement.TCWriteValue.TCWriteState.writeState_9 C# (CSharp) Method

writeState_9() public method

public writeState_9 ( ) : int
return int
                public int writeState_9()
                {
                    XmlWriter w = CreateWriter();
                    w.WriteElementString("root", "");
                    w.Dispose();
                    try
                    {
                        this.InvokeMethod(w, CurVariation.Param.ToString());
                    }
                    catch (InvalidOperationException)
                    {
                        try
                        {
                            this.InvokeMethod(w, CurVariation.Param.ToString());
                        }
                        catch (InvalidOperationException)
                        {
                            return TEST_PASS;
                        }
                    }
                    catch (ArgumentException)
                    {
                        if (WriterType == WriterType.CustomWriter)
                        {
                            try
                            {
                                this.InvokeMethod(w, CurVariation.Param.ToString());
                            }
                            catch (ArgumentException)
                            {
                                return TEST_PASS;
                            }
                        }
                    }
                    // Flush/LookupPrefix is a NOOP
                    if (CurVariation.Param.ToString() == "Flush" || CurVariation.Param.ToString() == "LookupPrefix")
                        return TEST_PASS;

                    return TEST_FAIL;
                }