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

Add custom static classes for parsing #187

Closed
OlegNadymov opened this issue Jul 25, 2018 · 6 comments
Closed

Add custom static classes for parsing #187

OlegNadymov opened this issue Jul 25, 2018 · 6 comments

Comments

@OlegNadymov
Copy link
Contributor

Hi!
Could you create a convenient way of adding my custom static classes which I can use for dynamic parsing?
I've used for System.Dynamic.Linq this way https://stackoverflow.com/a/18313782. It uses Reflection. So it's not convenient.
I hope you can explain me how can I do it in System.Linq.Dynamic.Core.

Thank you in advance!

@OlegNadymov
Copy link
Contributor Author

OlegNadymov commented Jul 27, 2018

Hi @StefH !
Yes, I did. I had tried this solution and wrote about it in my message. The solution is based on Reflection. It's not convenient.

Could you make the method with the signature is like below:
public static void TryAdd(Type type, int x)
And what is parameter "x" mean here?

Or if you don't mind I can fork your project and create pull request.
What do you think?

@StefH
Copy link
Collaborator

StefH commented Jul 27, 2018

Sorry. I copy pasted the wrong link.

Just scroll down on that stackoverflow page and look for DynamicLinqType. That would be an option.

@OlegNadymov
Copy link
Contributor Author

OlegNadymov commented Jul 31, 2018

It's a quite good solution. But I have to add reference to System.Linq.Dynamic.Core in all projects in which I have classes for dynamic parsing from. Also I need to decorate the classes with DynamicLinqTypeAttirubute.
I can do it for my case. But if I have an external project I won't can do it.
So it would be great to have method like this public static void TryAdd(Type type, int x)

@StefH
Copy link
Collaborator

StefH commented Jul 31, 2018

@OlegNadymov
Copy link
Contributor Author

Yes! It meets my needs! Thank you!

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

No branches or pull requests

2 participants