Exemplo n.º 1
0
        public void CheckSerializationAndDeserialization(string xmlPath, object obj)
        {
            var xml = EmbeddedResources.Get(xmlPath);

            xml = ReplaceVariable(xml);
            XmlAssert.AreEqual(xml, Serializer.Serialize(obj));
            var obj2 = Serializer.Deserialize(xml, obj.GetType());

            XmlAssert.AreEqual(xml, Serializer.Serialize(obj2));
        }
        public void MapVersion2()
        {
            var xml   = EmbeddedResources.Get("ExtendedXmlSerializerTest.Resources.TestClassWithMapV2.xml");
            var klasa = Serializer.Deserialize <TestClassWithMap>(xml);

            Assert.Equal(klasa.NowyWezel, "test");
            Assert.Equal(klasa.ZmianaWartosci, "Stara");
            Assert.NotNull(klasa.PropClass);
            Assert.Equal(klasa.PropClass.Wartosc, 12);
            Assert.Equal(klasa.PropClass.Wezel1, "WartoscWezlas");
        }
        public void MapVersionXmlWithOutVersion()
        {
            var xml = EmbeddedResources.Get("ExtendedXmlSerializerTest.Resources.TestClassWithMapWithoutVer.xml");

            var klasa = Serializer.Deserialize <TestClassWithMap>(xml);

            Assert.Equal(klasa.NowyWezel, "Wartosc");
            Assert.Equal(klasa.ZmianaWartosci, "Nowa");
            Assert.NotNull(klasa.PropClass);
            Assert.Equal(klasa.PropClass.Wartosc, 1);
            Assert.Equal(klasa.PropClass.Wezel1, "WartoscInna");
        }
Exemplo n.º 4
0
 public static byte[] GetBytesFullname(string nameWithNamespace, out string mimeType)
 {
     return(EmbeddedResources.Get(m_resourceList, nameWithNamespace, out mimeType));
 }
Exemplo n.º 5
0
 public static byte[] GetBytes(string name, out string mimeType)
 {
     return(EmbeddedResources.Get(m_resourceList, "Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources." + name, out mimeType));
 }
 public static byte[] GetBytes(string name, out string mimeType)
 {
     return(EmbeddedResources.Get(HTMLRendererResources.m_resourceList, "AspNetCore.ReportingServices.Rendering.HtmlRenderer.RendererResources." + name, out mimeType));
 }
Exemplo n.º 7
0
 public static byte[] Get(string name, out string mimeType)
 {
     return(EmbeddedResources.Get(ReportViewerEmbeddedResources.m_resourceList, name, out mimeType));
 }