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.

UseOptimizedNamespaces never finishes

See original GitHub issue

When I try using the UseOptimizedNamespaces() extension method, the serialization of the objects never finishes.

This is how I do the serialization inside a custom OutputFormatter:

public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
{
    var configurationContainer = new ConfigurationContainer()
        .UseOptimizedNamespaces();
    var serializer = configurationContainer.Create();
    var result = serializer.Serialize(context.Object);
    return context.HttpContext.Response.WriteAsync(result);
}

Am I doing something wrong or is this a known problem? I could not find an issue that describes this problem.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
eluchsingercommented, Jul 7, 2018

I have not been able to reproduce the bug with a unit test using this repo. It must have to do something with the code around the serialization. I will open a new issue, if I can narrow down the bug.

1reaction
eluchsingercommented, Jun 28, 2018

I do not have a Unit Test. Maybe I can tell you more next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does using namespaces in every page a bad practice
In general, never hesitate Using something that you are using (no pun intended). But you should avoid declaring unnecessary using directives ...
Read more >
How to fix Kubernetes namespaces stuck in the terminating ...
Sometimes the process to delete Kubernetes namespaces gets hung up, and the command never completes. Here's how to troubleshoot terminating ...
Read more >
Leveraging Namespaces for Cost Optimization with ...
In short, you can use Kubernetes namespaces to set resource requests and limits to ensure that your Kubernetes clusters have enough resources ...
Read more >
Code Syntax Style: Namespace Imports - ReSharper
Optimize namespace imports using Code Cleanup · Select ReSharper | Options from the main menu or press Alt+R O . · Go to...
Read more >
The Definitive Guide For Kubernetes Namespace
Kubernetes namespaces are excellent for managing different teams, services, and applications within one cluster. But not on its own.
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