|
|
nice one!
|
|
|
|
|
Real developers don't test. Just push to production.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
It's all in your head.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Good news.
I'd like to suggest you test your serializer against Mehdi Gholam's FastJSON serializers: [^], [^]
As well as the serializer by Christophe Bernard that I mentioned to you recently:[^].
And, may I suggest a few tests:
Dictionary<Class1Instance, Dictionary<Class2Instance, Class1Instance>> Tests using System.Dynamic and Expando.
TreeNodeCollection of a WinForm TreeView (I would be surprised if you nail this one, and I don't expect you to).
RTF Text from a WinForm RichTextBox.
Generic Observable Collection Class
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Hi Bill,
Good of you to post that, I spot another bug in my library!
As a side note this meant to be a document serializer to save my document file easily and efficiently. I am not expecting to cover everything here!
For one thing my serializer explicitly DOES NOT support (just ignore) pointers, IntPtr, Delegates, and private field / properties (unless explicitly specified)
Anyhow it was worth trying some of your suggestions, so...
As to each suggested type:
- What about
FastJSON ?
I am not even trying (to be as fast), since I purposely avoided System.Emit, as it is NOT supported on UWP, .NET Core, Android, iOS - What about
Dictionary<Class1Instance, Dictionary<Class2Instance, Class1Instance>>
Pfff, peanuts! - What about
dynamic ?
You know what? While I have no clue I expected it to fail. However it currently fail on an unexpected bug, so still testing...
The dynamic was deserialized as a Missing (my build in result for when I can't restore the type) wit all the property there! - What about a WinForm form with RTF text and TreeNode collection?
Same here.. I am not too concerned by success, but I got an unexpected bug: Type.GetType("System.Drawing.Bitmap,System.Drawing") returns null... mmm.. since I do NOT want to be restricted by the assembly version number, I might have to use type registration after all.. still in progress....
modified 2-Jul-16 1:00am.
|
|
|
|
|
Hi Super Lloyd,
Sounds like it's going well, and I look forward to seeing the result.
I'm not clear exactly what the connotations of the words "document serializer" are to you; to me, it conjures the image of a some kind of "raw" data file, rather than a file that could be translated into .NET objects ... perhaps my understanding is "challenged" ?
I have a slightly superstitious belief that you should not "name" something before it is finished. It makes perfect sense to me that Thais give their children nick-names that are often a bit grotty, and, if a child is particularly handsome/beautiful, the nick-name is even more "negative."
So we have Nong Oon, Nong Gop, Nong Ngu: "kid fatty," "kid frog," "kid snake." This is based on the idea (shared with the ancient Greeks ?) that the various spirits and entities lurking about in the cluster of animist beliefs and traditions that "surrounds" Theravadan Buddhism are attracted to lovely children and will "mess" with them.
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
BillWoodruff wrote: I'm not clear exactly what the connotations of the words "document serializer" are to you; to me, it conjures the image of a some kind of "raw" data file, rather than a file that could be translated into .NET objects ... perhaps my understanding is "challenged" ?
mm.. good question... too much MVVM affected my thinking.
By document I am thinking MMVM models or even better, just M (models) which I see as simpler object because they seldom relying an events (hence my descision to ignore delegate) use few if any unmanaged dependencies (though I have an ISurrogate<> interface for things such as Bitmap or singleton) and can mostly described (and serialized) by their public properties / fields and maybe and IList / IDictionary interface.
Alright.. let's finish debugging this yet unnamed library!
Thanks for the feedback!
|
|
|
|
|
Sorry.. to be more clear.. the intent is not cloning of object or passing them accross process boundary.
The objective is to implement the "File > Save " menu.
So delegate and IntPtr must go... obviously...
But Bitmap can be turned into byte[] with ISurrogate<>
As a side note I just succesfully cloned a WinForm with a TreeNode collection and a RichTextBox.
Though I used the "Text"property so.. no RTF
And the dynamic also work now! Even I can't believe it!
|
|
|
|
|
|
Do young melons not get married because they cantaloupe?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Orange you just hilarious.
That's what I do. I drink, and I know things. ~ Tyrion Lannister
|
|
|
|
|
That was pretty meloncholy.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
This sound familiar.
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
The newlywed melon paused to read a pamphlet on consummation as his bride waited on the bed of the honeymoon suite. He stopped to ask "Wait, what're mah loins?".
|
|
|
|
|
Another seedy attempt at a pun? Getting ripe to the core of this fruitless endeavor will pit common against sense. Juice the same, keep it up.*
* That's what the Mrs. would say . . .
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
WWH (what would honeydew)?
I am not a number. I am a ... no, wait!
|
|
|
|
|
|
Nah, it's that we all love boobys!
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
I don't.
Particularly if Herself is reading over my shoulder...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
That's when I love them the most, right in my face.
|
|
|
|
|
Genuine lol moment.
|
|
|
|
|
Herself now points well-endowed women to me when I don't notice them. I trained her well.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|