System.Xml.Tests.TCFullEndElement.TCWriteValue.TCWriteBase64.Base64_9 C# (CSharp) Méthode

Base64_9() public méthode

public Base64_9 ( ) : int
Résultat int
                public int Base64_9()
                {
                    byte[] buffer = new byte[10];

                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("root");
                            switch (CurVariation.Param.ToString())
                            {
                                case "lang":
                                    w.WriteStartAttribute("xml", "lang", null);
                                    break;
                                case "space":
                                    w.WriteStartAttribute("xml", "space", null);
                                    break;
                                case "ns":
                                    w.WriteStartAttribute("xmlns", "foo", null);
                                    break;
                            }
                            w.WriteBase64(buffer, 0, 5);
                        }
                        catch (InvalidOperationException)
                        {
                            return TEST_PASS;
                        }
                    }

                    CError.WriteLine("Did not throw exception");
                    return TEST_FAIL;
                }