Comments (10)
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.
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.
Okay, Sina, I gave it a shot for a full day. So far I have achieved the following:
- .Net Framework code modified, all unit test still pass. Good.
- .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:
- 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.
- 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>
- 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.
๐ ๐ฅ Impressive!
from yaxlib.
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.
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.
@sinairv this is a major feature!
from yaxlib.
I'll start to integrate it into a project now, as first proof of concept. Keep fingers crossed.
from yaxlib.
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.
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)
- Generic deserialization methods should not hide base methods with 'new', e.g. with a generic base class HOT 1
- Possible regression caused by PR #183 HOT 9
- Extend tests to cover YAXSerializer and YAXSerializer<T> HOT 2
- Extend caching and pooling for better performance HOT 10
- Split IYAXSerializer<T> to IYAXSerializer<T> and IYAXDeserializer<T> HOT 7
- Make Exception a KnownType HOT 4
- All public members of YAXSerializer (generic/non-generic) should be fully covered by unit tests HOT 1
- How serialize a list as an attribute HOT 7
- Extend SerializationContext for pre-processing in ICustomSerializer and IKnownType
- Add unit tests for YAXCollectionItemTypeAttribute and YAXElementForAttribute
- Add YAXSerializationOptions.StripInvalidXmlChars HOT 3
- Structs are not serialized correctly HOT 3
- Update docs for new v4 features
- Multiple Elements with Same Name? How to Deserialize?
- Add support for DateOnly and TimeOnly types
- Is it possible deserialize to property by attribute name and inner xml with YAXLib?
- Serializing/Deserializing ValueTuples HOT 1
- Serialize not filtering properties correctly in .NET Standard HOT 6
- Serialized strings that use the stringbuilder pool throw when the string's length is > 1024 (DefaultStringBuilderCapacity).
- Collection Deserialization with RecursiveWithNoContainingElement HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaxlib.