GithubHelp home page GithubHelp logo

Support for .Net Core about yaxlib HOT 10 CLOSED

yaxlib avatar yaxlib commented on June 21, 2024
Support for .Net Core

from yaxlib.

Comments (10)

axunonb avatar axunonb commented on June 21, 2024 2

Hi Sina, the first port to .Net Core is completed and uploaded to GitHub (https://github.com/axunonb/YAXLib). All 216 unit test for .Net Framework and the 200 unit test relevant for .Net Core run successfully,
Any code parts which should eventually be improved are marked with //TODO: FXCORE ....
If further test confirm that the port works, YAXLib will be the best XML Serialization Library for .Net Core as well.
Unless you have any comments I will send a pull request these days.

from yaxlib.

sinairv avatar sinairv commented on June 21, 2024

Quite interested. I just have time restrictions. There are lots of other enhancements apart from support for .NET Core in my mind that I simply don't have the time to do.

from yaxlib.

axunonb avatar axunonb commented on June 21, 2024

Okay, Sina, I gave it a shot for a full day. So far I have achieved the following:

  1. .Net Framework code modified, all unit test still pass. Good.
  2. .Net Core code compiles, 122 unit tests pass, 78 still fail. Tests not supported under .Net Core excluded.

Looks like tests will become kind of a headache for 3 reasons:

  1. Test code contain types currently not supported in .Net Core (e.g. System.Drawing.Color, Dataset...), that's why support of these types is not a must for YAXLib for now, but they are required for the tests. So which tests could be skipped for .Net Core is a key question.
  2. A good part the test results come close to the asserted, so the number of failures is not that discouraging. But "close" is not equal. Example for AnotherArraySampleTest()ยด:
    Expected and working with .Net Framework 4:
<!-- This example shows usage of jagged multi-dimensional arrays -->
<AnotherArraySample xmlns:yaxlib=""http://www.sinairv.com/yaxlib/"">
  <Array1>
    <Array2OfInt32 yaxlib:dims=""2,3"">
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>2</Int32>
      <Int32>3</Int32>
    </Array2OfInt32>
    <Array2OfInt32 yaxlib:dims=""3,2"">
      <Int32>3</Int32>
      <Int32>3</Int32>
      <Int32>3</Int32>
      <Int32>4</Int32>
      <Int32>3</Int32>
      <Int32>5</Int32>
    </Array2OfInt32>
  </Array1>
</AnotherArraySample>

Got under .Net Core much more properties serialized (same with e.g. PathsExampleTest):

<!-- This example shows usage of jagged multi-dimensional arrays -->
<AnotherArraySample xmlns:yaxlib="http://www.sinairv.com/yaxlib/">
  <Array1>
    <Length>2</Length>
    <Rank>1</Rank>
    <SyncRoot yaxlib:realtype="System.Int32[,][]" />
    <IsReadOnly>False</IsReadOnly>
    <IsFixedSize>True</IsFixedSize>
    <IsSynchronized>False</IsSynchronized>
    <Array2OfInt32 yaxlib:dims="2,3">
      <Length>6</Length>
      <Rank>2</Rank>
      <SyncRoot yaxlib:realtype="System.Int32[,]" />
      <IsReadOnly>False</IsReadOnly>
      <IsFixedSize>True</IsFixedSize>
      <IsSynchronized>False</IsSynchronized>
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>1</Int32>
      <Int32>2</Int32>
      <Int32>3</Int32>
    </Array2OfInt32>
    <Array2OfInt32 yaxlib:dims="3,2">
      <Length>6</Length>
      <Rank>2</Rank>
      <SyncRoot yaxlib:realtype="System.Int32[,]" />
      <IsReadOnly>False</IsReadOnly>
      <IsFixedSize>True</IsFixedSize>
      <IsSynchronized>False</IsSynchronized>
      <Int32>3</Int32>
      <Int32>3</Int32>
      <Int32>3</Int32>
      <Int32>4</Int32>
      <Int32>3</Int32>
      <Int32>5</Int32>
    </Array2OfInt32>
  </Array1>
</AnotherArraySample>
  1. My insights into YAXLib come to a limit where I would have to invest a lot more time. Using the library is a different story than creating it (of course).

I uploaded the current (unbeautified) state of my YAXLib fork to https://github.com/axunonb/YAXLib
Maybe you could have a first look and give your opinion.

from yaxlib.

304NotModified avatar 304NotModified commented on June 21, 2024

๐Ÿ‘ ๐Ÿฅ‚ Impressive!

from yaxlib.

304NotModified avatar 304NotModified commented on June 21, 2024

Do you got it running on appveyor?

Also isn't it better to move to one SLN and project file? Or maybe that is a good next step.

from yaxlib.

axunonb avatar axunonb commented on June 21, 2024

Well, I had my ups and downs with this port :) but still: cheers.
appveyor is still one of my "white spots", so: no, sorry.
One SLN: Yes, isn't a be a big deal. I do that with other projects as well.

from yaxlib.

304NotModified avatar 304NotModified commented on June 21, 2024

@sinairv this is a major feature!

from yaxlib.

axunonb avatar axunonb commented on June 21, 2024

I'll start to integrate it into a project now, as first proof of concept. Keep fingers crossed.

from yaxlib.

sinairv avatar sinairv commented on June 21, 2024

I'm super excited. Lots of thanks @axunonb. This is great work. I will look into it in more details tomorrow. Thanks again.

from yaxlib.

axunonb avatar axunonb commented on June 21, 2024

Thanks, Sina, you're welcome. I worked a bit more on remaining tests for .Net Core. Now Collections and Dictionaries are included, but I replaced Color with string. These 7 tests are not covered in .Net Core, everything else is fine:

DeserializationTest  DesColorExampleTest
DeserializationTest  DesDataSetAndDataTableDynamicKnownTypes
KnownTypeTests       DataSetAndDataTableSerializationTest
KnownTypeTests       TestColorNames
KnownTypeTests       TestExtensionMethod
KnownTypeTests       TestSingleKnownTypeSerialization
SerializationTest    ColorExampleTest

Eventually System.Drawing.Color could be replaced with another known type also available in .Net Core.

from yaxlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.