question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More flexibility with cloning state

See original GitHub issue

blazor.state 1.0.0-preview6.19307.2-20190710-124031 .NET Core 3.0.100-preview6-012264

I found some time to experiment with the current Blazor preview and blazor.state. I seem to have ironed out most of the glitches but I have one problem, still:

I need to use IOrderedEnumerable<KeyValuePair<string, int>> but AnyClone does not support this format.

Until now, I just implemented public override object Clone() => new TilesState(this); but this does not work any longer.

One solution would be to have the Clone method optional. Use only if overridden. If you have a better Idea, I am all ears.

Error:

AnyClone.TypeException: Unsupported IEnumerable type: OrderedEnumerable`2
   at AnyClone.CloneProvider`1.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
replaysMikecommented, Aug 1, 2019

I’m currently investigating this and will have a fix out today

1reaction
StevenTCramercommented, Jul 31, 2019

@michaelvolz I have been able to duplicate the issue. I have pinged @replaysMike of AnyClone for advice.

But for this particular case, I suggest you change SomeOrderData

public IOrderedEnumerable<KeyValuePair<string, int>> SomeOrderedData => SomeData.OrderBy(entry => entry.key);

If you have a public repo with an example I would be happy to look for further options.

If you were to write a clone of this manually how would you clone it?

I have fixed the issue with not calling the IClonable version and added a test case for that.

Please let me know your thoughts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Homologous alignment cloning: a rapid, flexible and highly ...
The incredible cloning success rates together with the multiple practical benefits of low cost, vector flexibility, insert orientation and speed ...
Read more >
Cloning humans? Biological, ethical, and social ...
Human cloning would still face ethical objections from a majority of concerned people, as well as opposition from diverse religions.
Read more >
MoCloFlex: A Modular Yet Flexible Cloning System
Our destination vector allows iterative rounds of cloning. Iterative cloning in our system needs an extra cloning step from the MCF-Destination ...
Read more >
What Is Oracle Cloning and How Does It Work?
Oracle cloning refers to the process of creating a copy of an existing Oracle database, including its structure, schema, tables, and data.
Read more >
Gateway Cloning Comes of Age—Exclusive Interview
Gateway cloning has a number of advantages over other recombinational cloning technologies, particularly with regard to the efficiency of the reactions and the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found