Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xml/Report FromXml does not provide an overload for additional parameters. #84

Closed
bigsmity opened this issue May 3, 2024 · 4 comments
Closed
Assignees

Comments

@bigsmity
Copy link

bigsmity commented May 3, 2024

public static Report FromXml(string content)
{
using (var stream = new MemoryStream())
using (var writer = new StreamWriter(stream))
{
writer.Write(content);
writer.Flush();

            stream.Position = 0;

            return FromStream(stream);
        }
    }

My workaround was to prepare a stream and use:
public static Report FromStream(Stream stream, bool removeUnusedObjects, bool collapseDuplicateContexts, bool removeDuplicateFacts)

@dgm9704 dgm9704 self-assigned this May 3, 2024
@dgm9704
Copy link
Owner

dgm9704 commented May 3, 2024

Thanks for reporting and providing a workaround! I will check this out and get back to you.

@dgm9704
Copy link
Owner

dgm9704 commented May 4, 2024

This seems like an easy fix with just adding some overloads. In the meantime, might I ask a about your use case for this? I think originally made the FromXml method just for internal testing purposes and didn't think there would be any actual use for it in an actual application. I'm just curious plus I wan't to make sure I'm not overlooking something else that people actually need.

dgm9704 pushed a commit that referenced this issue May 4, 2024
dgm9704 pushed a commit that referenced this issue May 4, 2024
@dgm9704
Copy link
Owner

dgm9704 commented May 4, 2024

Fixed in v3.2.1

@dgm9704 dgm9704 closed this as completed May 4, 2024
@bigsmity
Copy link
Author

bigsmity commented May 5, 2024

This seems like an easy fix with just adding some overloads. In the meantime, might I ask a about your use case for this? I think originally made the FromXml method just for internal testing purposes and didn't think there would be any actual use for it in an actual application. I'm just curious plus I wan't to make sure I'm not overlooking something else that people actually need.

Thank you for taking a look at my issues so quickly. We are communicating with a webservice that uses xbrl payloads and are storing responses in a table as a cache to limit these calls. We also anonymize the data and run in future test cases. Using sql server with text column and entity framework, so we have a string which the method suited perfectly.

We just moved up to the current version as we have updated to .net 8 and some new test cases identified the duplicate issue, and then the need to switch off the duplicate parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants