示例#1
0
        public When_writing()
        {
            var classInfo = new[]
            {
                new Class
                {
                    Name      = "MyClass",
                    XmlName   = "MyClass",
                    Namespace = "",
                    Fields    = new[]
                    {
                        new Field
                        {
                            Name      = "Age",
                            Type      = "String",
                            XmlType   = XmlType.Element,
                            XmlName   = "Age2",
                            Namespace = "wibble"
                        },
                        new Field
                        {
                            Name    = "Name",
                            Type    = "String",
                            XmlName = "Name",
                            XmlType = XmlType.Attribute
                        },
                    }
                }
            };

            var writer = new ClassInfoWriter(classInfo);

            stringWriter = new InMemoryTextWriter();
            writer.Write(stringWriter);
        }
示例#2
0
        public When_writing()
        {
            var classInfo = new[]
                {
                    new Class
                    {
                        Name = "MyClass",
                        XmlName = "MyClass",
                        Namespace = "",
                        Fields = new[]
                        {
                            new Field
                            {
                                Name = "Age",
                                Type = "String",
                                XmlType = XmlType.Element,
                                XmlName = "Age2",
                                Namespace = "wibble"
                            },
                            new Field
                            {
                                Name = "Name",
                                Type = "String",
                                XmlName = "Name",
                                XmlType = XmlType.Attribute
                            },
                        }
                    }

            };

            var writer = new ClassInfoWriter(classInfo);
            stringWriter = new InMemoryTextWriter();
            writer.Write(stringWriter);
        }