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

Added JavaScript translations for Dictionary methods #1029

Merged
merged 6 commits into from May 26, 2021

Conversation

acizmarik
Copy link
Member

@acizmarik acizmarik commented May 24, 2021

This PR further improves #1014 (which should be merged first). Also relevant for #831.

New Dictionary<K,V> methods

  • Clear()
  • ContainsKey(key)
  • Remove(key)

This also adds an improvement when defining JS translations for methods with generic parameters owned by their declaring type.

@acizmarik acizmarik added this to the Version 3.1 milestone May 26, 2021
Base automatically changed from feature/dictionary-support-in-viewmodels to main May 26, 2021 10:22
@acizmarik acizmarik marked this pull request as ready for review May 26, 2021 10:53
public void JsTranslator_DictionaryClear()
{
var result = CompileBinding("Dictionary.Clear()", new[] { typeof(TestViewModel5) }, typeof(void));
Assert.AreEqual("dotvvm.dictionaryHelper.clear(Dictionary)", result);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use method from arrayHelper

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this once List translations PR is merged. This will be resolved within translations refactoring PR

@acizmarik acizmarik merged commit d7807a9 into main May 26, 2021
@acizmarik acizmarik deleted the feature/dictionary-translations branch May 26, 2021 13:01
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

Successfully merging this pull request may close these issues.

None yet

1 participant