public void WriteXml(XmlWriter w)
 {
     w.WriteElementString("CompositeType", CompositeType.ToString());
     w.WriteElementString("ImageCount", ImageCount.ToString(CultureInfo.InvariantCulture));
     w.WriteElementString("RefreshRate", RefreshRate.ToString(CultureInfo.InvariantCulture));
     w.WriteElementString("Start", Start.ToString(CultureInfo.InvariantCulture));
     w.WriteElementString("Interval", Interval.ToString(CultureInfo.InvariantCulture));
 }
Пример #2
0
        public void ToStringListsTypesInExpectedOrder()
        {
            CompositeType type = new CompositeType(new[]
            {
                typeof(IEnumerable),
                typeof(IDisposable),
                typeof(ParentClass),
                typeof(IEqualityComparer)
            });

            // Should be ordered by namespace-qualified name

            Assert.AreEqual(
                "{" +
                SomeClassName + ", " +
                IEnumerableName + ", " +
                IEqualityComparerName + ", " +
                IDisposableName + "}",
                type.ToString());
        }
Пример #3
0
        public void ToStringListsTypesInExpectedOrder()
        {
            var type = new CompositeType(new[] {
                                                   typeof (IEnumerable),
                                                   typeof (IDisposable),
                                                   typeof (SomeClass),
                                                   typeof (IEqualityComparer)
                                               });

            // Should be ordered by namespace-qualified name

            Assert.AreEqual(
                "{" +
                SomeClassName + ", " +
                IEnumerableName + ", " +
                IEqualityComparerName + ", " +
                IDisposableName + "}",
                type.ToString());
        }
Пример #4
0
        public void ToStringListsSingleTypeCorrectly()
        {
            CompositeType type = new CompositeType(new[] { typeof(IEnumerable) });

            Assert.AreEqual("{" + IEnumerableName + "}", type.ToString());
        }
Пример #5
0
        public void ToStringListsSingleTypeCorrectly()
        {
            var type = new CompositeType(new[] {typeof (IEnumerable)});

            Assert.AreEqual("{" + IEnumerableName + "}", type.ToString());
        }